![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Regex only returning partial databy throop (Chaplain) |
on Jun 06, 2008 at 17:54 UTC ( [id://690721]=note: print w/replies, xml ) | Need Help?? |
There are three dashes in your example, not two. And a previous poster's comments about escaping the dash apply. So I'm unsure just what you're trying to do. Still, you're wanting to change the greedy behavior of [...]{1,75}. Check out What does it mean that regexes are greedy? in perlfaq6 throop update: you've added more examples, so let me give you some more comments –
Are you ever going to have line breaks in your titles?
If this looks unfamiliar, check out How can I hope to use regular expressions.. I have some doubts that you really want the spec [\w\s\d()\-,]{1,75}. That is, are you really confident that you're not going to see a line like and lose on the '&'?
In Section
Seekers of Perl Wisdom
|
|