Regular Expressions
Posted: Thu Feb 19, 2004 6:31 am
Hello Viewer
I am a newcomer in PHP. I'v studied a lot about regular expressions from PHP manuals. But still now I am confused about this.
Would u pls anyaone describe some expressions by their own way how they easily realise this. So it'll be very helpful to understand for me.
Here some expressions I'v qouted below -
Most of all, If anyone of u got any easier way to understand the Regular Expressions, pls mention it here.
Pls never mind of my poor english.
Thanks ALL
I am a newcomer in PHP. I'v studied a lot about regular expressions from PHP manuals. But still now I am confused about this.
Would u pls anyaone describe some expressions by their own way how they easily realise this. So it'll be very helpful to understand for me.
Here some expressions I'v qouted below -
Code: Select all
<?php
if(preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{2}\s/', $line)){
$validlines[] = $line;
}
?>Code: Select all
<?php
preg_replace('/\s{2,}/', ' ', $valid)
?>Most of all, If anyone of u got any easier way to understand the Regular Expressions, pls mention it here.
Pls never mind of my poor english.
Thanks ALL