-
-
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.match does not seem to support seqs #11759
Comments
That's an interesting bug.. I thought this would reproduce the issue, but it doesn't!: https://play.nim-lang.org/#ix=1OHl works well. See if you can tweak that example to reproduce the bug. Refs: |
Ok, the seq needs to be initialized to the required length, which can be done at run time too. So this works: https://play.nim-lang.org/#ix=1OHt |
May be an error should be thrown if Nim passes an unallocated or zero-length |
Duplicate of #9472 ? |
@narimiran Yes, this one is a duplicate. |
This runnable example from the documentation works fine:
Although the signature suggests that it accepts an
openArray
for the matches variable,match()
does not populate that var if a seq is supplied instead of an array. The proc does correctly identify whether a match exists between the source string an the regular expression pattern.Example
Current Output
Expected Output
Possible Solution
Call a spade a spade and demand an array for output.
Additional Information
The text was updated successfully, but these errors were encountered: