Skip to main content

Hello,

 

 

I need to reformat some strings.

3/2-A1 needs to become 3/2-A01. Where I have a dash followed by a letter followed by a number I want to replace it by dash, the same letter, 0, then the same number.

I can find my string using a regular expression :

->A-Z]Z1-9]

and I've tried - A-Z]0]1-9] in the Replacement text box of String Replacer but (unsurprisingly that just gives me

3/2-2A-Z]0]1-9]

Is there away to search for the whole regex, but only replace part of it?

text to match: (-[A-Z])([1-9])

 

replacement text: \\10\\2

 

 

putting parentheses around sections creates parts, and then you can refer to the parts as \\1, \\2 etc.


Reply