Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Regular Expression function for EasyCatalog/InDesign

New Here ,
Jan 23, 2024 Jan 23, 2024

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.

TOPICS
Experiment , How to , Scripting
358
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 23, 2024 Jan 23, 2024

Pile Height: 16mm

 

Regex

(?i)Pile\hHeight\:\h\d+?mm

 

Not sure if it's helpful for the catalog - but looks right to me

Translate
Community Expert ,
Jan 23, 2024 Jan 23, 2024

Pile Height: 16mm

 

Regex

(?i)Pile\hHeight\:\h\d+?mm

 

Not sure if it's helpful for the catalog - but looks right to me

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2024 Jan 23, 2024

I seems to work! Thanks a lot! 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2025 May 07, 2025
LATEST

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:

 

Pile Height:\s*(\d+mm)

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines