I need to update a dateformat in a large file I have in textpad.
the dateformat is currently mm-dd-yyyy and I need to make it mm/dd/yyyy
each line with a date starts with a D.
like this:
D02-12-2009
I have my regex search portion working fine ^D(.?)-(.?)-(.*?)?, but the replace is failing when trying to use $1 $2 $3 for my values D$1/$2/$3. It's replacing with the literal $1, $2, and $3. I have set textpad to use POSIX regex.
Any ideas how to capture the values and put them into my replace portion?
Best Answer
Please use
\1 \2 \3
instead of$1 $2 $3
Find What:
D([0-9]+)-([0-9]+)-([0-9]+)
Replace With:
D\1/\2/\3
Before
After
Regarding Grouping
PS:I have no idea why this is moved to here, I had to come here for the first time. :-)