Yacasu
June 23, 2021, 12:14pm
1
Hi,
I would like to find and replace the end of a multi-input field (after “Bonjour” using regex). It works well with Chrome but since Safari does not support lookahead/behind I got this error on this browser : “bad regex format : invalid regular expression: invalid group specifier name”
The regex I use :
(?<=Bonjour).*$
Thanks
Yacasu:
(?<=Bonjour).*$
Check this out
I think your expression may be off.
Online regular expression tester for Python, PHP, Ruby, JS, Java and MySQL. Regex visualizer. Syntax highlighting. Cheatsheet. Generate string corresponding to a regex.
Yacasu
June 23, 2021, 12:41pm
3
jared.gibb:
Yacasu:
(?<=Bonjour).*$
Thanks for your reply.
It works well on Chrome, and on the test site you sent me
The problem is that lookbehind & lookahead are not supported in Safari
Yacasu
June 24, 2021, 11:21am
4
Found the solution, quite complex though :
\b([^B]|B(B|o(B|n(B|nB)))([^Bo]|o([^Bn]|n([^Bj]|j([^Bo]|o([^Bu]|u([^Br]))))))) (B(B|o(B|n(B|nB)))*(o(n?|jour))?)?$
system
Closed
September 1, 2021, 12:14pm
5
This topic was automatically closed after 70 days. New replies are no longer allowed.