Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

find in files will not find certain valid regex patterns, but works inside the file #658

Closed
nikmartin opened this issue Feb 2, 2016 · 2 comments

Comments

@nikmartin
Copy link

given this regex:

\s*enum:\s*\[\r*\n*\s*\d

A file with this text is a match:

   enum:[
          9917001,
          9917003,

but will not be returned in a Find in FIles, BUT this regex WILL return this file:

\s*enum:\s*\[\r*\n*\s*

but only matches up to:

   enum:[

But if I then open the file all the matches that include the \d in the regex will be highlighted

Find in files with \d:
screenshot from 2016-02-02 13-31-08

and a file showing the match:
screenshot from 2016-02-02 13-32-33

Atom version: 1.5.0-beta2-a01dc47
OS and version: Arch Linux x86_64

Installed packages:

angularjs
atom-ternjs
language-ejs
package-cop
zentabs
atom-beautify
auto-copyright
linter
rest-client
atom-ctags
fonts
linter-js-standard
standard-formatter
atom-terminal
git-plus
minimap
Sublime-Style-Column-Selection

Additional information:

  • Problem can be reproduced in safe mode: [Yes]
  • Problem started happening recently, didn't happen in an older version of Atom: [Unknown]
  • Problem can be reliably reproduced, doesn't happen randomly: [Yes]
  • Problem happens with all files and projects, not only some files or projects: [Unknown]
@benogle
Copy link
Contributor

benogle commented Feb 2, 2016

Thanks for the detailed reproduction steps. This is because project find doesn't handle multi-line regular expressions at this time: atom/scandal#5

@benogle benogle closed this as completed Feb 2, 2016
@adamkdean
Copy link

@benogle Is this still the case more than three years on?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants