"Regex Help: How to Extract First PANTONE Color Before Semicolon in Switch
Posted: Tue Jul 23, 2024 1:34 am
Hi everyone,
I'm struggling with configuring a regular expression in Enfocus Switch and need some expert advice. I need to extract the first PANTONE color listed in a string, stopping at the first semicolon. Here’s an example of the string I’m working with:
PANTONE Bright Red C;PANTONE Dark Blue C;PANTONE Pink C;PANTONE Yellow PY12 C
From this string, I only want to select "PANTONE Bright Red C", however that would change for each job...
I tried to use ChatGPT to help write the code, but I it almost always returned ";;;;" instead of the exact text I wanted.
any thoughts?
I'm struggling with configuring a regular expression in Enfocus Switch and need some expert advice. I need to extract the first PANTONE color listed in a string, stopping at the first semicolon. Here’s an example of the string I’m working with:
PANTONE Bright Red C;PANTONE Dark Blue C;PANTONE Pink C;PANTONE Yellow PY12 C
From this string, I only want to select "PANTONE Bright Red C", however that would change for each job...
I tried to use ChatGPT to help write the code, but I it almost always returned ";;;;" instead of the exact text I wanted.
any thoughts?