This transformer will apply all trivial assertion (e.g. /(?!0)\d/ => /[1-9]/) and remove all branches in assertions that are guaranteed to reject (e.g. (?=\d+=|-)\w => (?=\d+=)\w).
/(?!0)\d/
/[1-9]/
(?=\d+=|-)\w
(?=\d+=)\w
Optional
This transformer will apply all trivial assertion (e.g.
/(?!0)\d/
=>/[1-9]/
) and remove all branches in assertions that are guaranteed to reject (e.g.(?=\d+=|-)\w
=>(?=\d+=)\w
).