Support » Plugin: Search Regex » replace text between two tags

  • Dear all
    I state that I am not a regex expert, but I’m trying to create a code based on some of the examples found on the web. My need is to replace the string

  • with the string <li class=”ingredient”> in all my posts. This change, however, must be done only for text between the shortcode [ingredients title = XXXX] and [/ingredient].
  • I’ve found the regex for search only the text between the shortcode:
    /(\[ingredients.*?\[\/ingredients\])/ism

    Anyone can help me for add to this the search of the

  • code and then the replace with <li class=”ingredient”>?

    thanks for your help

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

  • The topic ‘replace text between two tags’ is closed to new replies.