How would I use preg_replace to replace everything *between* two qualifiers without replacing the qualifiers themselves? In the following example, Im wanting to replace everything between the "x" and the "p" but what happens is that the "x" and the "p" *also* get replaced:
preg_replace(/(x).*?(p)/,......,example)
will output: e......le
instead of: ex......ple
Thank you
How would I use preg_replace to replace everything *between* two qualifiers without replacing the qualifiers themselves? In the following example, Im wanting to replace everything between the "x" and the "p" but what happens is that the "x" and the "p" *also* get replaced:
preg_replace(/(x).*?(p)/,......,example)
will output: e......le
instead of: ex......ple
Thank you
|
|
Search Webmaster Help and Solution
[RESOLVED] preg_replace without replacing qualifiersRelated ItemsQuery failed: connection to localhost:3354 failed (errno=111, msg=Connection refused). |
