[clug] OT meta-regex question

Michael Still mikal at stillhq.com
Tue Feb 3 04:06:04 GMT 2004


On Tue, 3 Feb 2004, Gough, Chris wrote:

>  A = '^.*$'
>  B = '^foo$'

For this simplistic example, you can just strip common starting and 
trailling elements, and then ask if:

.* could match foo

Here the answer is yes. This simple technique falls apart for more complex 
examples though:

A = '^.*o.*$'
B = '^f.*o$'

Are still willing to match the same characters, but .*o.* does not 
obviously match f.*o in my simple world.

Herm. My brain hurts.

Mikal

-- 

Michael Still (mikal at stillhq.com) | "All my life I've had one dream,
http://www.stillhq.com            |  to achieve my many goals"
UTC + 11                          |    -- Homer Simpson



More information about the linux mailing list