Thursday, 15 April 2010

pcre - RegEx - match all sentences contains 20 characters or more between specific tags -



pcre - RegEx - match all sentences contains 20 characters or more between specific tags -

i'm trying extract sentences contains 20 characters or more longer text, i'm far solution @ moment (regex flavor - pcre)

example text (i need 'bolded' sentences):

tylko u nas! kurtka wiatrówka sportowa. posiada podszewkę. przeznaczona biegania. kup teraz!

my regex @ moment:

(^|\.\s)(.{20,}?[a-z])(\!|\.\s|\.$|$)

[^.!><]{20,}

try this.see demo.

http://regex101.com/r/vr4fy4/16

regex pcre

No comments:

Post a Comment