if there is the string $a = "(a.b) b.c (c.d.e)"
now put the value in parentheses. Remove it, but outside the parentheses. Keep, the result that
needs to get is (ab) b.c (cde)
what should I do with it
if there is the string $a = "(a.b) b.c (c.d.e)"
now put the value in parentheses. Remove it, but outside the parentheses. Keep, the result that
needs to get is (ab) b.c (cde)
what should I do with it
it is convenient to use preg_replace_callback
method
$string = '(a.b)b.c(c.d.e)';
$newString = preg_replace_callback('/\(.*?\)/', function($subStr) {
return str_replace('.', '', $subStr[0]);
}, $string);
echo $newString;
result
(ab)b.c(cde)
$res = preg_match_all( src="(.+ .(png|jpg))"+? , <img src=" Public attached image 20170227 20170227143202_25223.jpg" alt="" ><img src="Public attached image 20170227 20170227143202_25223.jpg" alt=&...
<DIV class=xx_time> <LI>:2018-08-22 22:01:<script src=" plus count.php?view=yes&aid=514&mid=2" type= text javascript language="javascript">< script> < LI> < DIV> <DI...
php preg_replace replacement code is as follows $_POST[ content ] = preg_replace( < s*img(.*) .preg_quote($value[ name ]). (.*)> iUs , <img src=" . $attach[ bigimg ] . " > , $_POST[ content ]); now there is...
<soapenv:Envelope xmlns:soapenv="http: schemas.xmlsoap.org soap envelope " xmlns:soapenc="http: schemas.xmlsoap.org soap encoding " xmlns:xsd="http: www.w3.org 2001 XMLSchema" xmlns:xsi="http: www.w3.org 2001 XML...