>
> you could also use different delimiters and write for example:
> '/.*?(hello.*going).*/' or '[.*?(hello.*going).*]' the regular
> expression itself is merely ".*?(hello.*going).*" which matches the
> whole string and replaces it by the first matching expression
> sourrounded in by ()s (thats the '$1').
>
>

just a minor correction, i don't believe you could use
'[.*?(hello.*going).*]' as the delimiters have to be the same character.

the reason you use delimiters is so that you can use PREG modifiers after
the last delimiter, but still inside the expression. read up in the manual,
as the posibilities of PREG are enourmous...

-skate-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to