Copy link to clipboard
Copied
Hi all
Hope you can help with the below.
I am working with EasyCatalog plugin for InDesign and am trying to extract certain data from a cell with a function in a Custom Field Options.
This is the usual data in the cell:
<p>Yarn: 100% New Zealand Thin Wool or Tencel</p> <p>– Primary backing: 100% Polyester</p> <p>– Backing: 100% Polyester</p> <p>– Pile Height: 16mm</p>
I need to extract "Pile Height: (and the numbers) ". I spend the last 2 days reading about REGEX expressions etc. and I can't manage to do that no matter how I try. Could someone have any ideas?
Many thanks!
Miro.
Pile Height: 16mm
Regex
(?i)Pile\hHeight\:\h\d+?mm
Not sure if it's helpful for the catalog - but looks right to me
Copy link to clipboard
Copied
Pile Height: 16mm
Regex
(?i)Pile\hHeight\:\h\d+?mm
Not sure if it's helpful for the catalog - but looks right to me
Copy link to clipboard
Copied
I seems to work! Thanks a lot!
Copy link to clipboard
Copied
Hi Miro,
It sounds like you're trying to extract the "Pile Height" value using a regex expression in EasyCatalog, and it’s definitely doable with the right pattern. Given the structure of your data, here's a regex that should work:
Explanation:
Pile Height: is the literal text you're looking to match.
\s* accounts for any spaces or line breaks after the colon.
(\d+mm) captures the number (digits) followed by "mm", which is the value you're interested in.
You should be able to use this regex in the Custom Field Options to pull out the "Pile Height" and its corresponding number.
Let me know if that works, or if you run into any issues!
Best,
Henry James
Find more inspiration, events, and resources on the new Adobe Community
Explore Now