Page MenuHomePhabricator

\s regexp does not match all spaces in cirrus search
Open, LowestPublic

Description

Try [https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*+*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*+*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 1] (2 matches) as opposed to
[https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*\s*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\{\{%28%5BDd%5Denkmalgesch%C3%BCtztes+Objekt+%C3%96sterreich|%5BDd%5Doo%29+*\|+*%281%3D%29*\s*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 2] (1 match). the only difference is that the first uses ' *' to match spaces, while the second uses '\s*' to match spaces. The second regexp should yield at least the same number of matches as the fist regexp, as a space is always matched by \s (all whitespace). What is wrong here?

Simpler version with same behaviour:
[https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\|%281%3D%29*+*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\|%281%3D%29*+*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 1] (7 matches) &
[https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=advanced&search=insource%3A%2F\|%281%3D%29*\s*23205\}\}%2F+&fulltext=Search&search-cat-all=&search-cat-none=&search-file-copyright=any&search-file-type=&search-orig-query=insource%3A%2F\|%281%3D%29*\s*23205\}\}%2F&ns0=1&ns6=1&ns9=1&ns12=1&ns14=1&ns100=1&ns106=1&profile=advanced regexp 2] (6 matches).

sorry, could not mask urls correctly

Event Timeline

Herzi.Pinki raised the priority of this task from to Needs Triage.
Herzi.Pinki updated the task description. (Show Details)
Herzi.Pinki added a project: Commons.
Herzi.Pinki added a subscriber: Herzi.Pinki.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 18 2015, 10:03 AM
Herzi.Pinki renamed this task from \s does not match all spaces in cirrus search to \s regexp does not match all spaces in cirrus search.Jun 19 2015, 6:56 AM
Herzi.Pinki set Security to None.
Restricted Application added a project: Discovery. · View Herald TranscriptJun 23 2015, 6:38 AM
zhuyifei1999 moved this task from Incoming to Backlog on the Commons board.Jun 23 2015, 6:39 AM
Deskana triaged this task as Lowest priority.Dec 23 2015, 5:47 AM
Deskana added a subscriber: Deskana.
Restricted Application added a subscriber: Steinsplitter. · View Herald TranscriptDec 23 2015, 5:47 AM
Deskana moved this task from Needs triage to Search on the Discovery board.Dec 23 2015, 5:47 AM