Skip to content


"find" with RegExp is unfaithful with "^" char #692

gjtorikian opened this Issue · 1 comment

2 participants


Consider this small test file:

console.log('test: <test>')
var b = "hi";

A search for ^\w+ finds TWO results: var and b.

I've isolated the problem to this line of code:

It seems that the startIndex--in this case, anyway--is 4, which chops the var string off, which makes the match think that b is the beginning of a line.

@nightwing B.V. member

merging into #2059

@nightwing nightwing closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.