Hi all,
If i have the following string, how can i get “X of X” (x = page number) with RegularExpressions?
eg: “Page : 1 of 1”
I can use “[0-9]+ of [0-9]+”
but how about
“Page :
1
of 1”
Thanks so much
Hi all,
If i have the following string, how can i get “X of X” (x = page number) with RegularExpressions?
eg: “Page : 1 of 1”
I can use “[0-9]+ of [0-9]+”
but how about
“Page :
1
of 1”
Thanks so much
In the match activity there is a multiline option in the properties pane, have you tried that?
Something like the below :
[0-9]+[\s\r\n]*of[\s\r\n]*[0-9]+
This checks for spaces and new lines inbetween
O, i have not used this before.
Should i use “Is Match” or “Matches”?
Yes you can use either depending on what you want, if you want to determine if the string includes you regex and return a boolean use Is Match,
Matches will find all instances of the regex in the string and return them as an array
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.