PHP preg_replace - Very quick question
Posted
by RC
on Stack Overflow
See other posts from Stack Overflow
or by RC
Published on 2010-04-01T19:18:06Z
Indexed on
2010/04/01
19:23 UTC
Read the original article
Hit count: 238
php
|preg-replace
Masters of regular expressions, please help!
See this string:
$string = "http://www.url.com/?fieldA=123&fieldB=456&fieldC=789";
Assuming "fieldB" always has a positive non-decimal numerical value (but not necessarily three digits long), what preg_replace command do I need to remove it completely, such that the string will then read:
$string = "http://www.url.com/?fieldA=123&fieldC=789";
Thanks!
© Stack Overflow or respective owner