[wp-hackers] best way to remove shortcode from post content
fris
fris at fris.net
Sat Mar 24 15:43:15 UTC 2012
I know I could create/modify a shortcode and just return null content, but I
was hoping for a better solution via mysql, or some other plugin.
Found this from
http://kovshenin.com/2011/regex-replace-in-mysql-or-lib_mysqludf_preg-in-ubu
ntu-linux/
what would be the best way to remove shortcodes with variables like
[shortcodename id="12"]text here[/shortcodename]
this?
/(.?)\[(shortcodename)\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/
More information about the wp-hackers
mailing list