regular expression
4 отговора
156 прегледа
regular expression
ima li nachin da se razkara "\" ot string
sus ereg_replace
postoianno reve za greshka
s preg_replace - sushtoto...
sus ereg_replace
postoianno reve za greshka
s preg_replace - sushtoto...
Re: regular expression
<?php
$s='t\owa e \ t\est
';
print $s;
$s2=preg_replace("/\\\/","",$s);
print $s2;
?>

$s='t\owa e \ t\est
';
print $s;
$s2=preg_replace("/\\\/","",$s);
print $s2;
?>
ne luji choveka ;)
ima si komanda stripslashes($var) za celta
[линк]
imaj predvid, che tezi slashes ne se slagat sluchajno.... vyrshat si svojata rabota :)
razgledaj i funkciite strip_tags, addslashes i htmlspecialchars.
[линк]
imaj predvid, che tezi slashes ne se slagat sluchajno.... vyrshat si svojata rabota :)
razgledaj i funkciite strip_tags, addslashes i htmlspecialchars.
Re: ne luji choveka ;)
aham ..10x..:)
solvnah po drug nachin ama stripslashes e po elegantno :P
solvnah po drug nachin ama stripslashes e po elegantno :P
Re: ne luji choveka ;)
e, dzver, gledai malko w contesta na nechtata, choweka kaza che s preg_replace ne stawalo...