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
Yeah, negated shorthands \D, \W and \S are not recognised inside a charclass. This would have been fiddly but maybe I'll implement it sometime. Fortunately there is a trivial workaround, instead of writing [\S] just write [^\s] or \S, and instead of writing [\S\s] just write .. If you have something more complex like [\Wdef], render it as \W|[def] and then do what greenery is designed to do:
>>> from greenery import lego
>>> str(lego.parse('\\W|[def]').reduce())
'[^0-9A-Z_abcg-z]'
When I parse regex like [\S], it will give error like
The text was updated successfully, but these errors were encountered: