in reply to RE question: Sentence with a minimum length
m/\A \s* (\w+\s+\w+?.*?) (??{ length($1) >= 50 }) \s* \z/xs;
(Update: this regex might be very inefficient because both \w+? and .*? might match the same number characters. Use (\w+\s+\w.*?) instead.)
In general that sounds like a problem for which regexes aren't the best solution (split and friends might be better).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RE question: Sentence with a minimum length
by lima1 (Curate) on Oct 06, 2008 at 08:58 UTC |