pm771 wrote:Hi
I must be doing something wrong but can't figure it out.
Match:
- Code: Select all
(106)-([\d][\d])(..)(\.).([A-Z]).
Replace:
- Code: Select all
1006\3\4\5\2
For
106-01OH.DTS it gives me
1006OH.T01.DTS, while I expect
1006OH.T01What puts the second extension into the result?
TIA, Eugene
Hi Eugene, i think this must be an bug.
Since your regex don't advice to replace with the extension, the extension should not be there.
It seams as the program author add the extension automatically because of the chosen option "Include Ext." to the Replace-field too,
where it should be in the Match-field only, because the user decide what to do,... what to match and what to replace with.
But you find an good work around. Be happy with it
FROM:
106-01OH.DTS
TO:
1006OH.T01
But results badly in:
1006OH.T01.DTS
RegEx(1)
Match: (106)-([\d][\d])(..)(\.).([A-Z]).
Repla: 1006\3\4\5\2
[X] Include Ext.
- Code: Select all
106-01OH.DTS
106 - 01 OH . D T S
(106)-([\d][\d])(..)(\.).([A-Z]).
1 2 3 4 5
1006 \3 \4 \5 \2
1006 OH . T 01
1006OH.T01.DTS
Here is your regex simplified, perhaps this help? Sorry, i didn't know your skill in regex
106-(\d\d)(..)\..(.)
1006\2.\3\1
CU