Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
gjtorikian opened this Issue · 1 comment

2 participants

@gjtorikian
Collaborator

Consider this small test file:

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

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

I've isolated the problem to this line of code: https://github.com/ajaxorg/ace/blob/master/lib/ace/search.js#L140

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
Owner

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.