Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not matching "-" and "_" at the beginning of the line #44

Closed
nuthinking opened this issue May 16, 2014 · 7 comments
Closed

Not matching "-" and "_" at the beginning of the line #44

nuthinking opened this issue May 16, 2014 · 7 comments

Comments

@nuthinking
Copy link

"^-" or "^_" don't match anything on the editor but they are indeed valid regex.
screen shot 2014-05-16 at 18 15 38

@nuthinking
Copy link
Author

In v1 worked
screen shot 2014-05-16 at 18 15 01

@gskinner
Copy link
Owner

You have the multiline flag enabled in v1 but not v2. Without the multiline flag ^ matches the start of the string, not the start of a line.

@gskinner
Copy link
Owner

http://regexr.com/38rqv

@nuthinking
Copy link
Author

I added it then to v2 (see updated screenshot), maybe wasn't set? Thanks!

@nuthinking
Copy link
Author

@gskinner
Copy link
Owner

Your expression matches underscores, but your Text doesn't contain any (it has dashes). :)
http://www.regexr.com/38rr5

@nuthinking
Copy link
Author

The multiline got me, was using this before ^(--|__) :) Thanks!

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

No branches or pull requests

2 participants