roboto
Posts: 14 Joined: Sat Jul 31, 2010 11:45 am
Post
by roboto » Sat Jul 31, 2010 12:12 pm
Is there any book or learning resources for Rex except manual? Some examples, theory behind it?
John
Site Admin
Posts: 2622 Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:
Post
by John » Mon Aug 02, 2010 8:47 am
Url?
John Turnbull
Thunderstone Software
roboto
Posts: 14 Joined: Sat Jul 31, 2010 11:45 am
Post
by roboto » Mon Aug 02, 2010 3:21 pm
Thanks for answer mark. I am now more familiar with rex after searching through this message board(it is great!).
But topic about rex in manual is still not well covered.
mark
Site Admin
Posts: 5519 Joined: Tue Apr 25, 2000 6:56 pm
Post
by mark » Mon Aug 02, 2010 4:10 pm
mark
Site Admin
Posts: 5519 Joined: Tue Apr 25, 2000 6:56 pm
Post
by mark » Mon Aug 02, 2010 5:47 pm
Yes, more examples are always good.
That expression is ok.
>>(= : look for an open paren then
!)+ : match anything but close paren then
) : match close paren
!)+ could also be coded as [^)]+
For single characters you can go either way. But for a string you need !, as in >><td>=!</td>+</td>
roboto
Posts: 14 Joined: Sat Jul 31, 2010 11:45 am
Post
by roboto » Mon Aug 02, 2010 6:08 pm
But that expression doesnt match text between parentheses.
It matches text with parentheses. Something like this would return text between parentheses '>>(\P=!)+'
mark
Site Admin
Posts: 5519 Joined: Tue Apr 25, 2000 6:56 pm
Post
by mark » Mon Aug 02, 2010 10:56 pm
Correct. Whether the parens are desired as part of the data varies.
To ensure that there is a matching paren but not include either paren in the data use
>>(\P=!)+\F)