1 Reply Latest reply on Nov 6, 2006 8:01 AM by jdeline

    reFindNoCase: multiple matches

    Daryath
      I have a string, wich could have multple matches.
      But if i search with refindnocase, i will only find 1 match.

      Let's say i have a string that looks like this (in an XML file):
      <setting key="header" value="hi [name], welcom to my [site]. " />

      Now i already have the [name] and [site] variables.
      But since i can't use #name# in the XML file, i need to replace them with the value.

      I want to find both [name] and [site] in the string and replace them with the correct value.
      But i can only find the first one.

      How can i find both?
      the regexp i use now is: <cfset regexp = "\[+[[:word:]]*\]" />

      Maybe i need to do this with a <cfloop condition=""></cfloop>
      Can someone help me with this?