I added a shortcode for preg_replace to my SHORTcURL Plugin

Now, with a shortcode for the single most powerful PHP function there is (preg_replace), I dare to imagine that there is nothing that this simple plugin cannot do.

If you know what this amazing function, preg_replace, is capable of then put it to the test.

Here is an example of the syntax for the new new shortcode that calls preg_replace:

[preg_replace replace=”/to be searched/” with=”I replaced”]<li>The content to be searched</li>[/preg_replace]

and this is what you get:

  • The content I replaced