Remove "Page XXX from XXX" in a string with Regex

Hi, I have a longer string that contains “Page XXX of XXX”. Where XXX is a specific number that can have 1-3 digits.
E.g. “Page 3 of 199”. I would like to have a Regex that removes the whole expression from the string. Thanks for your advice.

“Page\s+\d+\s+of\s+\d+”

1 Like

Hi Jizh,
You can use “Page\s\d{3}\sof\s\d{3}”
Plus–> One or more character of the preceding token.

Thanks,
Senthil V.

1 Like

@Senthilkumar55
Thanks, that’s more precise.
So “Page\s\d{1,3}\sof\s\d{1,3}” is the way to go :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.