How RegExp Rename only the first occurrence
Posted: 23 Feb 2022 00:51
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 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.