Needing to replace . with -

A swapping-ground for Regular Expression syntax

Needing to replace . with -

Postby justingambit » Wed Apr 20, 2016 10:02 pm

Hey all,

I am needing to run some tests before I do this in production. Here's my dilemma:

I have a file share where our users have named documents month.day.year PO# EXAMPLE: 01.25.2016 183018.pdf

Due to the second . Windows search will not find the PO#. I cannot, for the life of me, seem to replace the . with a - without completely removing the name of the file. My test document is labeled creating.a.user.pdf

Any ideas what my regex should be?

Thanks all!
justingambit
 
Posts: 2
Joined: Wed Apr 20, 2016 9:57 pm

Re: Needing to replace . with -

Postby Admin » Thu Apr 21, 2016 2:01 am

Hi, did you try using Replace (3) ?
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: Needing to replace . with -

Postby justingambit » Thu Apr 21, 2016 2:13 pm

I tried it yesterday but for some reason could not get it to work. I tried this morning and it works just fine. Thanks! =D

Do you know if it is possible to just select the folders and change the filenames? The file share I am needing to do this too has thousands of files buried under subfolders.
justingambit
 
Posts: 2
Joined: Wed Apr 20, 2016 9:57 pm

Re: Needing to replace . with -

Postby Admin » Fri Apr 22, 2016 2:28 am

Yes, see options "folders" and "subfolders" in Filter (12)
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm


Return to Regular Expressions


cron