http://qs321.pair.com?node_id=11125611


in reply to Re: My regex works, but I want to make sure it's not blind luck
in thread My regex works, but I want to make sure it's not blind luck

If you want a . . . (well, I almost said "fun" but that's probably not the right word :) an interesting rabbit hole to go down check out Nondeterministic finite automaton and Deterministic finite automaton to get a better picture of what's going on under the hood in a regex engine. And/or find an undergraduate course in automata theory to audit. If you use the Regexp::Debugger that's already been mentioned above it'll let you watch and you can almost picture the state machine hopping along from node to node until it gets to a valid terminal state.

The cake is a lie.
The cake is a lie.
The cake is a lie.