-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
re, nre have wrong start
semantics
#14284
Comments
Are you saying that you expect The |
@andreaferretti ok the following example convinces me that you're right, and that when true: # D20200511T013107:here gitissue
import nre
proc main()=
let src = """xabc"""
let pattern = re"(?<=x|y)abc"
let ret = find(src, pattern, start = 1)
echo ret
main() Still though, before closing this issue, I think we should
@nitely do you agree? |
The docs say: |
Using In all this cases, one rarely uses |
@andreaferretti so how do we specify we want the match to occur at position (see also nitely/nim-regex#80) |
re, nre have wrong
start
semantics; nim-regex has correct semanticsExample
Current Output
this works:
nim r -d:case3 main
Expected Output
Possible Solution
start
(in re) and withstart
orend
(in nre), and replace all these with procs that take a string slice; there would be no room for guess-work sincestart
would not even part of the APIAdditional Information
The text was updated successfully, but these errors were encountered: