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
At the moment, possessive repetitions (aka. possessive qualifiers) are not supported by RE2:
Possessive repetitions:
x*+
zero or more x, possessive
x++
one or more x, possessive
x?+
zero or one x, possessive
x{n,m}+
n or ... or mx, possessive
x{n,}+
n or more x, possessive
x{n}+
exactly nx, possessive
Are there any plans for supporting possessive repetitions in the future? I understand that RE2 has no intentions to support lookarounds as expressed here because it forces the use of backtracking, but possessive qualifiers are exactly the opposite and are in line with that philosophy.
For additional motivation regarding this, it is currently impacting the way Search works on GitHub. Search is using Enry (as mentioned in this blog post) which relies on RE2. However, the regexes used for identifying the programming language used in a file are based on user-submitted regexes from Github-Linguist which uses the Oniguruma flavor of regex (and has possessive qualifiers support). This can lead to weird inconsistencies for GitHub users.
The text was updated successfully, but these errors were encountered:
At the moment, possessive repetitions (aka. possessive qualifiers) are not supported by RE2:
x*+
x
, possessivex++
x
, possessivex?+
x
, possessivex{n,m}+
n
or ... orm
x
, possessivex{n,}+
n
or morex
, possessivex{n}+
n
x
, possessiveAre there any plans for supporting possessive repetitions in the future? I understand that RE2 has no intentions to support lookarounds as expressed here because it forces the use of backtracking, but possessive qualifiers are exactly the opposite and are in line with that philosophy.
For additional motivation regarding this, it is currently impacting the way Search works on GitHub. Search is using Enry (as mentioned in this blog post) which relies on RE2. However, the regexes used for identifying the programming language used in a file are based on user-submitted regexes from Github-Linguist which uses the Oniguruma flavor of regex (and has possessive qualifiers support). This can lead to weird inconsistencies for GitHub users.
The text was updated successfully, but these errors were encountered: