REX help for Data From Field

Post Reply
rgwin0
Posts: 15
Joined: Fri May 04, 2007 1:45 pm

REX help for Data From Field

Post by rgwin0 »

Hi, I want to use Data From Field to parse the Modify Date from this html:

<!-- ITEMDATE: 2010-07-21 13:00:00 -->

Can you help me with the REX search and replace expressions?

Thanks,
rob
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

REX help for Data From Field

Post by mark »

One posibility is
search: <\!-- \RITEMDATE: =....-..-.. ..:..:..= -->
replace: \2

Variations could ignore the open and close comments to find the tag in the text as well, ignore the case of the tag, be more relaxed about the type and amount of whitespace, and be more restrictive about the allowed digits within the date.
rgwin0
Posts: 15
Joined: Fri May 04, 2007 1:45 pm

REX help for Data From Field

Post by rgwin0 »

Thanks, that should work fine. Related to this, I couldn't seem to find the documentation about how the replace syntax works (without parentheses as in regex). Does the 2 relate to the 2nd "repetition operator"?
User avatar
mark
Site Admin
Posts: 5514
Joined: Tue Apr 25, 2000 6:56 pm

REX help for Data From Field

Post by mark »

Post Reply