3 ms·
I believe he's saying you'd want: (?=((?!exp).)*a.*) I'm a little dubious that full equivalence is maintained (particularly w.r.t. to e.g. #match), but my b
by mnarayan01 10y ago
I believe he's saying you'd want:
(?=((?!exp).)*a.*)
I'm a little dubious that full equivalence is maintained (particularly w.r.t. to e.g. #match), but my brain isn't up to handling convoluted REs this early.
Edit: Another hangup I have is how would you do something like:
((?~E1)|E2)E3
Obviously you can distribute by duplicating E3, but then it's pretty clear what the absent operator buys you.
- rntz 10y ago(?=((?!exp).)*a.*) is also wrong; it doesn't match "expba", but (?~exp)a.* does.
- mnarayan01 10y ago/(?=((?!exp).)*a.*)/ =~ "expba" # => 1 for me at least (using #match is also truthy, but the matched string is not what I'd guess the absent operator would give).
- rntz 10y agoHuh! Now I am super confused.