We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
find
The regex library doesn't work as advertised
import std/re let s = "abcdefgabc1234abcdefg" let r = re"abc(\d+)" var matches: seq[string] echo find(s, r, matches) echo matches
Both 1.6.10 and devel
7 @[]
7 @["1234"]
No response
The text was updated successfully, but these errors were encountered:
It seems like the re library is very broken.
code:
import std/re let s = "abcdefgabc1234abcdefg" let r = re".*abc(\d+).*" if s =~ r: echo matches
Output:
["1234", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
Sorry, something went wrong.
No bug here. You're supposed to use something like
import std/re let s = "abcdefgabc1234abcdefg" let r = re"abc(\d+)" var matches: array[1, string] echo find(s, r, matches) echo matches
No branches or pull requests
Description
The regex library doesn't work as advertised
Nim Version
Both 1.6.10 and devel
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: