ExifTool Forum

ExifTool => Newbies => Topic started by: jmiller on January 12, 2023, 03:14:47 PM

Title: EXIF Command to Parse String Between 2 Underscores
Post by: jmiller on January 12, 2023, 03:14:47 PM
Hi Everyone,

I previously had an EXIF Regex command I had created to extract a string between two underscores in a filename and write it into the Model XMP attribute. After picking up my project after a couple of weeks, suddenly its not working. Can someone point me to how to adjust the REGEX to get this working?

Example:
10010088_1_.jpg

Command:
exiftool "-Model<${Filename;s/_([^_]+)_"

Result:
10010088_1_.jpg;s_([^_]+)_

Desired Result:
1
Title: Re: EXIF Command to Parse String Between 2 Underscores
Post by: Phil Harvey on January 12, 2023, 09:19:02 PM
This is a duplicate post. :(

See my response in your other thread (https://exiftool.org/forum/index.php?topic=14359.0).