Page MenuHomePhabricator

Regex find and replace doesn't work on Wikipedia in French with AWB
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • I add in Options/Find and replace (box ticked)/Normal settings (regex box of the line ticked) :

Find:

^(\s*\|\s*)nom_mk     (\s*=\s*)

Replace:

$1autres noms$2
  • I connect AWB using my bot account to Wikipedia in French

What happens?:
On the page https://fr.wikipedia.org/w/index.php?title=Mojanci nothing is modified.

What should have happened instead?:
"nom_mk" should be changed to "autres noms"

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
The regex works on regex101 : https://regex101.com/r/LQUfdi/1
I made a "Reset to default settings" to no avail.
The Find and replace/Normal settings works with a non regex replacement (i.e. "nom_mk " => "autres noms", but I want to use regexes later, I didn't made tests with other ones yet.

[EDIT] I tried to replace the "\s" by " " (normal space) to no avail.
But another regex works on this same page (i.e. "\{\{ *(mk|en) *\}\} *\{\{ *(mk|en) *\}\}" => "{{mul|$1|$2}}".

Event Timeline

Rjwilmsi subscribed.

When using a regex starting with ^ you will need to tick the Multiline option - see documentation at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Find_and_replace