How RegExp Rename add Bracket before Hashtag and at the end of Filename

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
taufan
Posts: 32
Joined: 22 Mar 2020 02:33

How RegExp Rename add Bracket before Hashtag and at the end of Filename

Post by taufan »

Hi,
For example i have 2 file:

Code: Select all

filename_1 #dog #f3.jpg
filename_2 #dog #duck #f4.jpg
the result I want is:

Code: Select all

filename_1 [#dog #f3].jpg
filename_2 [#dog #duck #f4].jpg

I try RegExp Rename with

Code: Select all

^([^#]+)(#)(.+) > $1[$2$3
But the result is like this:

Code: Select all

filename_1 [#dog #f3.jpg
filename_2 [#dog #duck #f4.jpg

Any idea?

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: How RegExp Rename add Bracket before Hashtag and at the end of Filename

Post by highend »

^([^#]+)(#[^\.]+)(.+) > $1[$2]$3
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

taufan
Posts: 32
Joined: 22 Mar 2020 02:33

Re: How RegExp Rename add Bracket before Hashtag and at the end of Filename

Post by taufan »

Hi,
Thank you, it works
🙏

Post Reply