2 Replies Latest reply on Jan 23, 2009 2:59 PM by Loic.Aigon

    [JS CS3] Grep difficulty

    Loic.Aigon Adobe Community Professional
      Hi,
      I succeeded creating a grep pattern which is used for a string replacement.
      var myRegExp = new RegExp ("\..-.*.indd")

      if the string is like this, it runs very well :
      var x = "001296.01.A-ATELIER GLOTIN.indd";

      but like this, it's not satisfying :
      var x = "001296.01.ABC-ATELIER GLOTIN.indd";

      I cant't get a grep search for a dot, any character n times, a dash, any character n times, a dot, and indd string.
      if I do this, var myRegExp = new RegExp ("\..*-.*.indd"), it removes almost everything in the string

      What I do wrong ? I am seraching on all grep sites but can't find any clue.
      Thanks for light, Loic