Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50080

Regex in Regex function mode

$
0
0
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?

Viewing all articles
Browse latest Browse all 50080

Latest Images

Trending Articles



Latest Images