In the first form the `re` is applied after the string literal is already 
parsed as a "normal" (non-raw) string `\s`. In the second form the string 
literal is parsed as a raw string `\\s` (see @Hlaaftana 's link).

For what it's worth, I was wondering if there's a way to query the regex object 
for the string it was created from, but I didn't find anything in the [re 
documentation](https://nim-lang.org/docs/re.html). Trying to `echo` the regex 
gives a type error and printing the `repr` isn't helpful (for me at least ;-) ).

Reply via email to