https://bugzilla.wikimedia.org/show_bug.cgi?id=48614

       Web browser: ---
            Bug ID: 48614
           Summary: Search and replace not working for lookahead
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Page editing
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

I have recently started using the regex feature in the Edit Toolbar's Search
and Replace.

I have been unable to get a regex using a lookahead to successfully replace the
text. As an example, here -
http://en.wikipedia.org/w/index.php?title=User:Sillyfolkboy/Resources/Ath_Sandbox_1&action=edit

Using "\d   (?=\w)" successfully finds all the lines starting with a digit and
three spaces (followed by a letter). When I click "replace all" I'm told that
123 replacements have been made, but no text is replaced. Clicking find next,
then replace all tells me that 123 replacements have been made again. The
replace function seems to fail when a lookaround is included in the search.

This may be just a learning issue for myself given the lack of documentation
(see https://bugzilla.wikimedia.org/show_bug.cgi?id=23626) but what I'm doing
works on http://www.regextester.com/ which ostensibly should be doing the same
thing as Wikipedia's search and replace.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to