Adding spaces to files

A swapping-ground for Regular Expression syntax

Adding spaces to files

Postby kaede1337 » Sun Nov 05, 2017 11:49 am

Been trying to add a space to certain files before/after a certain word.
IE
2016christmasdinner.mp4
to
2016 christmasdinner.mp4

How do I add space before every word christmas? and a space after
kaede1337
 
Posts: 2
Joined: Sun Nov 05, 2017 11:43 am

Re: Adding spaces to files

Postby KenP » Sun Nov 05, 2017 12:22 pm

The easiest way is probably to use the Replace feature.

Replace (3)
Replace: christmas
With: christmas <space christmas space>



Alternatively if you want to use regex, or if there isn't always a space both in front and behind the work christmas.
RegEx (1)
Match: (.*)\s?(christmas)\s?(.*)
Replace: \1 \2 \3
KenP
 
Posts: 196
Joined: Sat Jul 30, 2016 11:25 am

Re: Adding spaces to files

Postby kaede1337 » Sun Nov 05, 2017 1:33 pm

thanks it works, saved me lots of time
kaede1337
 
Posts: 2
Joined: Sun Nov 05, 2017 11:43 am


Return to Regular Expressions


cron