For the life of me I cannot find out how to utilize (if at all) regexp variables beyond the expression
in the overall expression...i.e. extended scope ??
OK..what I am doing is"Format value" of a $regexp expression to a TEMP tag...
then I USE this TEMP in a 2nd action point.
e.g. in the %title% tag is a date which I wish to save to %RELEASETIME% BUT ONLY if I CAN find it !!
SO Action Point 1 Format Value to TEMP
$regexp(%title%,'^(?.)(?\d{4}-\d{2}-\d{2})(?.$)',$+{MyDate})
and pulling from TEMP in the next Action to RELEASETIME
$IF($EQL(%Title%,%TEMP%),,%TEMP%)
CAN I somehow merge these two into 1 statement easily..i.e. DIRECT to RELEASETIME.
I use variables PreText, PostText and MyDate as I REPEAT this structure in other extracts.
If you use the same data (contents) in various contexts, you could create actions first that set this data to user-defined fields (a sort of variable declaration).
You then re-assemble the other data from these declaration fields.
I doubt that. Any variable only lives within the current function.
Example: you have your string
Create an action that fills the user-defined tag-fields PRETEXT, POSTTEXT, MYDATE
(e.g. "Guess values" or whatever. Depends)
Then use the tag-fields as you need them
Finally, delete them, when you don't need them anymore.
Yes...OK..that's what I was doing anyway with TEMP...
I had a further look and there 'could' be an alternative though haven't seen any examples in here and that is to use conditionals within the regex statement..
Basically if I DO find a date then load that date into MyDate otherwise load a null string into MyDate...
Now I have seen that the syntax is something like (?(A)X|Y)...
But to be quite honest I haven't a clue how I could use this syntax...