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
The "best" way to replicate generating examples for absent operator groups is with a negative lookbehind, e.g:
(?~abc) --> (?:.(?<!abc))*
But since look-behinds are irregular, this library cannot support that! A possible workaround would be to replace the group with a repetition of the first letter negated, e.g:
(?~abc) --> (?:[^a]*)
However (!!) this generalisation is not always possible:
(?~\wa|\Wb) --> ???
Therefore, the only 100% reliable option - which is what this gem currently does - is just to match "nothing"!
/(?~abc)/.examples #=> [""]
However, as shown above, this library could, at least, be enhanced to deal with specific scenarios in better ways. But such a strategy needs to be optimised for generalisation and reliability.
The text was updated successfully, but these errors were encountered:
The "best" way to replicate generating examples for absent operator groups is with a negative lookbehind, e.g:
But since look-behinds are irregular, this library cannot support that! A possible workaround would be to replace the group with a repetition of the first letter negated, e.g:
However (!!) this generalisation is not always possible:
Therefore, the only 100% reliable option - which is what this gem currently does - is just to match "nothing"!
However, as shown above, this library could, at least, be enhanced to deal with specific scenarios in better ways. But such a strategy needs to be optimised for generalisation and reliability.
The text was updated successfully, but these errors were encountered: