Skip to main content
ldallan
Participant
January 23, 2011
Question

Re: HowTo? Replacement pattern for StringSubstitution?

  • January 23, 2011
  • 1 reply
  • 495 views

With Perl compatible regular expressions, I can have a regex do string replacement with \1 to represent the pattern to be preserved in the replacement.

IMG_1234.cr2 --> YYMMDD_061234_Description.cr2

using a pattern such as:

IMG_([0-9]{4}).cr2 --> YYMMDD_06\1_Description.cr2

This doesn't work in Bridge, and I don't see what "token" to use as a "placeholder" for the part of the string to be preserved.

In the above example, the ([0-9]{4}) is recognized, but I don't see how to reuse that placeholder.

This topic has been closed for replies.

1 reply

Participant
January 24, 2011

You can use $1 to represent the matching part.