Closed GoogleCodeExporter closed 9 years ago
This is for Issues not feature requests. Regardless, you can still reference
the regex. Just put braces around it and reference it that way
/(.*abc.*)
then use
$1
in your add
Original comment by DJG6...@gmail.com
on 19 Jun 2013 at 10:26
Thanks for this tip but can you elaborate a little on how to use it? I try the
following and it doesn't work
<search position="replace" regex="true"><![CDATA[
/.*addToCart.*/
]]></search>
<add><![CDATA[
$1
]]></add>
Can I use $1 in php? For example:
<?php
echo "$1";
echo str_replace("button", "button special", "$1");
?>
Thanks
Original comment by tri...@gmail.com
on 20 Jun 2013 at 1:48
The simplest way to find out.... try it!
Original comment by DJG6...@gmail.com
on 20 Jun 2013 at 2:21
I tried the following but doesn't work, it simply removes the entire line
that match addToCart
<search position="replace" regex="true"><![CDATA[
/.*addToCart.*/
]]></search>
<add><![CDATA[
$1
]]></add>
I tried it in php like this but doesn't work
<?php
echo "$1";
echo str_replace("button", "button special", "$1");
?>
Please give me some suggestion on how to format $1. Is this in the wiki?
I look through it but couldn't reference of $1 anywhere.
Original comment by tri...@gmail.com
on 20 Jun 2013 at 2:27
Notice the missing ( ) from your search compared to mine
Original comment by DJG6...@gmail.com
on 20 Jun 2013 at 2:56
Thank you. That works. Would you consider adding this to the wiki? I
think it's useful to people.
Tri
Original comment by tri...@gmail.com
on 20 Jun 2013 at 2:55
Original issue reported on code.google.com by
tri...@gmail.com
on 19 Jun 2013 at 3:02