You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am converting my custom tokenizer to moo and ran into a problem case:
// a pattern that used to look like this:'(?<tag>\\$\\w*\\$)[\\s\\S]*?(?:\\k<tag>|$)'// as regex literal:/(?<tag>\$\w*\$)[\s\S]*?(?:\k<tag>|$)/
This pattern tries to match Postgres $$ strings, such as:
-- standard && string
$$lorem ipsum dolor$$
-- custom $$ string with tag (fails here)
$example$this example string fails$example$
The pattern normally works by backreferencing the captured tag between the first dollar signs to check if the second pair of dollar signs has the same tag but this breaks without the use of capturing group when lexing with moo.
Any suggestions on how to workaround this limitation ?
The text was updated successfully, but these errors were encountered:
I am converting my custom tokenizer to
moo
and ran into a problem case:This pattern tries to match Postgres $$ strings, such as:
The pattern normally works by backreferencing the captured tag between the first dollar signs to check if the second pair of dollar signs has the same tag but this breaks without the use of capturing group when lexing with
moo
.Any suggestions on how to workaround this limitation ?
The text was updated successfully, but these errors were encountered: