I want to extract "some_token" from the "some text :some_token" text.
The code below returns the full match ' :some_token' not the captured part 'some_token' marked with ([a-z0-9_-]+).
import re
let expr = re("\\s:([a-z0-9_-]+)$", flags = {re_study, re_ignore_case})
for match in "some text :some_token".find_bounds(expr):
echo "'" & match & "'"
How it could be modified to return only the captured part?
P.S.
Also, what's the difference between re and nre modules?