Understanding RegExps
Posted: Mon Aug 16, 2004 3:42 am
Hello,
I just made the experience that RegExps are WORN (write once, read never). I actually got help in this forum for the following RegExps, but unfortunately can not "read" them anymore. Can anybody give me a detailed, step by step description of the RegExps, so I really can understand the pattern?
preg_match_all('#^descr:\s*(.*?)\s*$#m', $array[3], $matches);
preg_match('#^\s*([^\s]+?)\s+(.*?)\s*$#s', $array[3], $matches);
Thanks a lot,
visionmaster
I just made the experience that RegExps are WORN (write once, read never). I actually got help in this forum for the following RegExps, but unfortunately can not "read" them anymore. Can anybody give me a detailed, step by step description of the RegExps, so I really can understand the pattern?
preg_match_all('#^descr:\s*(.*?)\s*$#m', $array[3], $matches);
preg_match('#^\s*([^\s]+?)\s+(.*?)\s*$#s', $array[3], $matches);
Thanks a lot,
visionmaster