I'd like to search for phrases using regular expressions on sites such as Wikipedia and Wikimedia Commons. Is it possible to do this?
Example regex search query: (facebook|google) (corporate history|websites)
It's already possible to do the same on Google (as demonstrated here), so I want to know whether it's possible for Wikipedia as well.
Best Answer
It's available and powered by the CirrusSearch (based on ElasticSearch) which is the used search engine in the MediaWiki sites, and the Wikimedia platform.
Some usage examples:
Note: Full guide reference, and source - on Wikipedia: Help:Searching#Search_string_syntax.
As for your question:
More examples:
AND
,OR
:"credit card" OR "payment card"
,"credit card" AND "payment card"
- will work as expected.charlie~ parker~
returnsCharlie Parker
,Charles Palmer
,Charley Parks
(up to two character difference, not including the first one).face*e
- starts withface
and ends with ane
with anything in the middle.Extra reading
Read more about the search engine and this extension to unveil their full functionality and features.