Hi,
How RegExp Rename and Replace only the first occurrence?
Example:
Picnic - 1 #cv2 #kid #fff.jpg
Picnic - 2 #kid #cv #fff.jpg
Picnic X - 3 #fff #cv1.jpg
Expected results:
Picnic - 1 [#cv2 #kid #fff.jpg
Picnic - 2 [#kid #cv #fff.jpg
Picnic X - 3 [#fff #cv1.jpg
I try RegExp Rename this code but didn't work:
(?<!#.*)# > [#
If successful, then the next final step is to make the filename like this:
Picnic - 1 [#cv2 #kid #fff].jpg
Any idea?
I just try to dive into the world of Regex.
Thanks for your help.
I really appreciated it.
How RegExp Rename only the first occurrence
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How RegExp Rename only the first occurrence
VB6 doesn't support look behinds
^([^#]+)(#)(.+) > $1[$2$3One of my scripts helped you out? Please donate via Paypal
-
taufan
- Posts: 53
- Joined: 22 Mar 2020 02:33
Re: How RegExp Rename only the first occurrence
Great,
It's work.
Thank you highend.
🙏
It's work.
Thank you highend.
🙏
XYplorer Beta Club