DyNama
3 discussion posts
Hi, gang,
Clipboard Fusion is really cool!
i need a macro to change date slashes to hyphens, eg 01/01/2013 to 01-01-2013. i can't program in C# or VB but i can edit when it looks evident, so i edited Replace Spaces with Hyphens to do the trick. the problem is that my sources also contain paths with forward slashes which also get replaced. could a macro be written that only replaces slashes that have 2- or 4-digit numbers on both sides? that could cause trouble with a path like D:/roses/12/01.jpg or http://roses.com/12/01.jpg so maybe a solution would be to only replace in a line before a ":/" if that's even possible.
01/01/2013, 13:01, http://roses.com/12/01.jpg - Mozilla Firefox -> 01-01-2013, 13:01, http://roses.com/12/01.jpg - Mozilla Firefox
Quick question: Is the date always at the start of each line? If so, we should be able to just do a replace on the first 10 characters of each line, or even just replace the first two forward slashes on each line.
DyNama
3 discussion posts
oops, sorry for the delay getting you an answer. yes, in fact it is always at the start of the line. i think either of those solutions would be fine.
Feb 4, 2013 (modified Feb 4, 2013)
•
#4
No worries! I'll look into this as soon as I get a chance.
Thanks!
Ok, here you go! Please let me know if you run into any issues with this macro.
Note that it will replace the 3rd and 6th characters in the line with a hyphen, regardless of what the original character was. So, this macro is only useful on lines that are formatted exactly the way you mentioned in your original post.
Thanks!
Change Date Slashes to Hyphens.jpg
DyNama
3 discussion posts
That will work! Thanx, Keith!
Excellent, glad to hear it!