View Single Post
Old 03-21-2024, 10:28 AM   #1
lindlind
Junior Member
lindlind began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2024
Device: none
Question Regex in Regex function mode

Doing a search and replace like the one below in Regex mode works perfectly fine:

Search: </span>\s*<br/>\s*
Replace: xx

But when doing the same thing in Regex function, nothing happens:

Search: </span>\s*<br/>\s*
Function: return match.group().replace('</span>\s*<br/>\s*', 'xx')

It seems as if everything works fine if I do not use \s or quantifiers in the function. How can I do this right?
lindlind is offline   Reply With Quote