"Find in files" search for a regular expression is incorrect
Original Reporter info from Mantis: Gorelkin
-
Reporter name: Sergei Gorelkin
Original Reporter info from Mantis: Gorelkin
- Reporter name: Sergei Gorelkin
Description:
Trying to search files for a regular expression produces incorrect results.
As an example:
- Open 'Find in files' dialog
- Enter '\sEDOM' (without quotes) as a search expression
- Check 'regular expressions' checkbox
- Select 'Find in directories' and enter path to ...\trunk\packages in FPC source tree.
- Enter standard '.pas;.pp;*inc' as a file mask.
- Check the 'search in subdirectories' checkbox.
It will find a lot of matches, matching 'EDOM' with one or two characters preceding, but it will never match 'EDOM' with preceding whitespace (which is the expected result).
At the same time, searching '\sEDOM' regular expression in a single file (in my case, it is trunk\packages\fcl-xml\src\dom.pp) with 'Search->Find' command works correctly.