Replace characters between parentheses
Hi, I'm trying to replace spaces with dots within the parentheses in a large list of files.
Files:
image - (2021 09 27) T132752.287.png
Microsoft Minesweeper 03 05 (2020 04 16) 10 p. m.jpg
unnamed - (2022 04 10) T004157.232.jpg
etc...
Goal:
image - (2021.09.27) T132752.287.png
Microsoft Minesweeper 03 05 (2020.04.16) 10 p. m.jpg
unnamed - (2022.04.10) T004157.232.jpg
I was trying Lookahead (regex):
Search: \ (=?(\(\d{4}))
Replace: . <= dot
I also tried to create groups with the spaces but it didn't work either:
Search: \d{4}(\ )\d{2}(\ )\d{2}
Replace: \.\.
I'll apreciate any help.
Thanks.
Files:
image - (2021 09 27) T132752.287.png
Microsoft Minesweeper 03 05 (2020 04 16) 10 p. m.jpg
unnamed - (2022 04 10) T004157.232.jpg
etc...
Goal:
image - (2021.09.27) T132752.287.png
Microsoft Minesweeper 03 05 (2020.04.16) 10 p. m.jpg
unnamed - (2022.04.10) T004157.232.jpg
I was trying Lookahead (regex):
Search: \ (=?(\(\d{4}))
Replace: . <= dot
I also tried to create groups with the spaces but it didn't work either:
Search: \d{4}(\ )\d{2}(\ )\d{2}
Replace: \.\.
I'll apreciate any help.
Thanks.
Replace: .*\K(\d{4}) (\d{2}) (\d{2})
with: \1.\2.\3
Use regular expressions
with: \1.\2.\3
Use regular expressions
Reply to #2:
Better...
Replace: \s+(?=[^(\)]*\))
with: .
Better...
Replace: \s+(?=[^(\)]*\))
with: .
Reply to #3:
David;
I was finally able to replace it!
Thanks!
David;
I was finally able to replace it!
Thanks!