Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Thank you for your response. When I run this in a test site like: phpliveregex.com it's fine. But when I run it in my php code it still fails. do I have to escape the last two '\\' to make this work? Commented Feb 13, 2014 at 19:53
  • Try adding one more \ before the }. \\ just means an escaped \, so there's nothing escaping the }. You should also add /m (for "match across lines"), like this: /\{\s*mailMerge:\s+details_activity_number\s*\\\}/m Commented Feb 13, 2014 at 19:58
  • Thanks. Still no luck. Again, it works fine in a regex test site but when I run my code it fails (the returned string is empty). I added the full function, if that will help. I really appreciate your help with this, as I'm against a deadline. Commented Feb 13, 2014 at 20:33
  • I clarified my answer somewhat; the code at bottom should address your problems. Mostly, it has to do with additional escaping. Commented Feb 13, 2014 at 20:44
  • now I get an error saying " NO MATCHES. CHECK FOR DELIMITER COLLISION. Commented Feb 13, 2014 at 20:59