Last modified: 2012-04-19 21:43:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 20597 - Search & Replace : Regular expressions with * does not work
Search & Replace : Regular expressions with * does not work
Product: MediaWiki extensions
Classification: Unclassified
UsabilityInitiative (Other open bugs)
PC Windows Vista
: Normal major (vote)
: ---
Assigned To: Trevor Parscal
Depends on:
Blocks: 36111
  Show dependency treegraph
Reported: 2009-09-11 17:55 UTC by Calcey QA
Modified: 2012-04-19 21:43 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Calcey QA 2009-09-11 17:55:57 UTC
Reporting against Babaco Release. (Hosted on

Steps to Reproduce ::
1) Start creating a new page 
2) Add some text in the edit window 
3) Click 'Search and replace' icon (e.g : Testing MediaWiki )
4) Set search for (Test* ) and Replace with (TESTING)
5) Check flag 'Treat search string as a regular expression'
6) Click 'Replace' button 

<<Testing is replaced with TESTINGing >>

Expected Outcome ::
* in Search string is ignored 
* Also other regular expressions are ignored (^ , $ etc)

Test Environment (Client) ::
Browser (User-Agent):  	Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20090729 Firefox/3.5.2
Javascript: 	Enabled
Cookies Enabled: 	Enabled
Java Enabled: 	Enabled
CPU class/type: 	OS/CPU Windows NT 6.0
Screen Width x Height: 	1280 x 800
Screen Color Depth: 	32
Comment 1 Chad H. 2009-09-11 18:08:50 UTC

The regular expression /Test*/ will match "Tes" with any possible number of t's on the end. This could be "Tes" or potentially "Testtttttt". In any case, when using the string "Testing Mediawiki" and I replace /Test*/ with "TESTING" I get "TESTINGing Mediawiki" as I'd expect.
Comment 2 Roan Kattouw 2009-09-11 19:01:55 UTC
As mentioned in comment #1, test* only matching test and not testing is perfectly valid behavior. You seem to want test[^ ]* (test followed by any number of characters that aren't spaces).
Comment 3 Calcey QA 2009-09-29 05:01:51 UTC
Added keyword babaco to the bug

Note You need to log in before you can comment on or make changes to this bug.