WordPress.org

Ready to get started?Download WordPress

Forums

Search Regex
Regex fails in plugin, succeeds in regexpal (2 posts)

  1. dmlehman99
    Member
    Posted 1 year ago #

    I'm trying to do some shortcode clean-up and am using the following expression:

    \[google-map-v3(.*)]

    But the plugin throws the error:

    "Invalid regular expression: Delimiter must not be alphanumeric or backslash"

    I've run the expression through regexpal.com and it does what I intend it to without problems. Is there a special syntax I'm missing?

    http://wordpress.org/extend/plugins/search-regex/

  2. ZainB
    Member
    Posted 1 year ago #

    Hi dmlehman99,

    Yes - the plugin states that you should not use a backslash (\). Also, you haven't specified any delimiters to use with your regular expression - they need to be set at the beginning and at the end.

    I found this particularly useful article on how to use regular expressions with the Search RegEx plugin - I hope you find it useful:

    http://journalxtra.com/websiteadvice/wordpress/mass-edit-wordpress-posts-with-regular-expressions-3396/#Useful_Search_Regex_Patterns

    Cheers,

    Zain

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic