I have strings in my html like this >> &rf=238255238255238255
So thats >> &rf=
(and 18 random digits)
How do I find that with a view to replacing it with ...
?
My own &rf=0101010101010101
I have strings in my html like this >> &rf=238255238255238255
So thats >> &rf=
(and 18 random digits)
How do I find that with a view to replacing it with ...
?
My own &rf=0101010101010101
Well, you can capture it using regex and replace it whatever value you want.
Your regex will be "/(?<=&rf=)\\d+/"
$re = "/(?<=&rf=)\\d+/";
$str = ">> &rf=238255238255238255";
$subst = "";
$result = preg_replace($re, $subst, $str);
See Demo here.