|
|
On 24/04/2013 06:31 PM, Warp wrote:
> IIRC a regular expression can be (and is usually) converted into a state
> machine that traverses the input data linearly once.
Yes, that was my understanding. (Although I've never actually seen the
algorithm in question, I imagine it can't be that complicated.)
> When the state machine
> ends up in one of specific nodes, you know that a match was found (and the
> node in question uniquely identifies which pattern was matching.)
I wasn't sure whether you could actually build such a state machine for
*several* different regular expressions simultaneously. I'm not sure how
you'd go about doing that...
Post a reply to this message
|
|