if(ereg("---",$line[$i])): echo "yes"; endif;
how can i define ONLY "---" matched the pattern in the start of the line?
ex:
---(match)
------Also match :-(
You want to match strings which begin with three dashes (-) so long as the next character is anything but a dash? preg_match('/---[-]/',$string,$matches); HTH Bubble
Originally posted by bubblenut You want to match strings which begin with three dashes (-) so long as the next character is anything but a dash? preg_match('/---[-]/',$string,$matches); HTH Bubble
Thanks !
I select the string one line by one line from file and if the "---" at the end of the page(the final line) .there has no next character(except for new line or type something else).It's not the matter of concern but can I figure out that?