QRegularExpressions not matching
-
Hello,
I'm trying to use QRegularExpressinos to match any URL in a larger string.
My regex is:\b(https?|ftp|file)(:\/\/)([-A-Z0-9+&@#\/%?=~_|!:,.;]*[A-Z0-9+&@#\/%=~_|])(\.[-A-Z0-9]*)Testing it out on sites like regex101 works, but in Qt it won't match.
I'm also using the same options i.e. /i /g.
Do i have to format it differently?Thanks.
-
I've only done a little bit of work with regular expressions in Qt. Just checking, you've used escape characters within your expression? Like '\\b' instead of '\b'
-
Hi,
You can use the regular expression example tool to check your regexp as well as get the escaped version for your code.