0 Replies Latest reply: May 21, 2012 2:01 PM by RickEEE RSS

    Regex question: How do I insert commas between meta data?

    RickEEE Community Member

      Current search engine is being replaced with Google Search Appliance (GSA). It requires meta data to be separated by a comma + space, whereas the previous search engine required only a space.  For example:

       

      <meta name="C_NAME" content="Screen1 Screen2">

       

      must become

       

      <meta name="C_NAME" content="Screen1, Screen2">

       

      There are 17 unique screen names and each of 2500 html files may have one or more screen names identified in that meta tag field.

       

      I am hoping for some regular express magic to help me with that global search/replace effort.  Suggestions are greatly appreciated.

      Thanks,

      Rick

       

      ================================

      Nevermind... figured it out.  Just needed to study regex syntax a bit. Here's the answer:

       

      Find:  <meta name="C_NAME" content="(\w+)\s(\w+)\s

      Replace:  <meta name="C_NAME" content="$1, $2,