|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Regular Expressions - php
This one is from a friend who is converting his .asp expressions into php:
Why doesn't this work with PHP? It works great on ASP. oRegExp.Global = TRUE oRegExp.Pattern = "((.|n)*?)" strInput = oRegExp.replace(strInput, "$1") I got this to work on PHP but results are flaky and it's not global. It replaces all instances with just one instance. $strOutput = eregi_replace("((.|n)*)", "\1", $strOutput); |
|
#2
|
|||
|
|||
|
RE: Regular Expressions - php
heh, regular expressions are never "flaky", they either work properly, or don't..
Anyhow : Remember that php uses (backslash) as an escape character as does regex, so you need to escape them for php first.. Not so in ASP. What do you mean, not global? |
|
#3
|
|||
|
|||
|
RE: Regular Expressions - php
Thanks, man. Will forward your solution to my friend.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Regular Expressions - php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|