0 Replies Latest reply on Sep 16, 2011 8:40 AM by Ray Schamp

    What is the syntax for replacement patterns in 'Find and Replace'?

    Ray Schamp

      I'd like to do something like this:

       

      Find: getURL('/services/(.*?)');

      Replace: getURL('/about/services/\1');

       

      So that I could do a global change to every getURL matching my pattern in the Flash file.  The find pattern does work, however for the life of me I can't discover how to use the captured piece in the replacement pattern.  The usual suspects \0 $0 \1 $1 don't work.  Is it possible to do? The syntax isn't explained in the documentation.

       

      The documentation for the Regular Expressions checkbox says

      Regular Expressions: Searches for text in regular expressions in ActionScript. An expression is any statement that Flash Pro can evaluate that returns a value.

       

      That seems to say it's for searching within regular expressions in Actionscript, not searching/replacing with regular expressions like in most text editors. However, using syntax like .*? only works if that checkbox is checked, so I think it is implemented, the replacement syntax is just undocumented.

       

      Thank you!