|
|
||
|
I think the main problem people have is that they are difficult to read 'at a glance'. Once you realise that they are often quite comprehensible once you start breaking them down, they become a lot easier, but a lot of people will look at them, and because they don't understand it immediately, the little switch that says 'I can't do this' trips, and they will say that regexps are hard and they can't do them without actually trying.
If people were introduced to regexps by things like
gr[ea]y
rather than
\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b
they'd probably find them a lot easier... I think the difficulty is mainly a mind-set one rather than actual difficulty.
-- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- --