Select spot color by regular expression

Post Reply
derkolarsky
Newbie
Posts: 2
Joined: Wed Jul 17, 2019 4:48 pm

Select spot color by regular expression

Post by derkolarsky » Thu Jul 18, 2019 8:28 am

Hello everyone…

I'm new to this forum and hope to find some hints for daily problems that I can't solve by myself.

Starting of with this problem: I want to create an action that selects spot color with names like "Laser", "Laser text", Lasertext" or "Personailzation".
I've found out that (maybe one way of many) I can use this regex code:

Code: Select all

/\b(laser.*|perso.*)/gi
but is there a different way to format this code within an action list?

Yes I know, I can also name the spot colors "by name" and add more with the OR statement but I wanted to give regex a try…

Anyone can help?

Thanks in advance
Ralf

Edit Found a solution: I'm using

Code: Select all

\b(Lase.+|lase.+|Pers.+|pers.+)
but haven't figured out if there's a flag that works case insensitive, i.e.

Code: Select all

\b(lase.+|pers.+)
to slim it a bit more… ;)

derkolarsky
Newbie
Posts: 2
Joined: Wed Jul 17, 2019 4:48 pm

Re: Select spot color by regular expression

Post by derkolarsky » Thu Jul 18, 2019 1:12 pm

Okay… I've got some help and that's what worked perfectly as I wanted to:

Code: Select all

\b((L|l)ase.+|(P|p)ers.+)
So if this is maybe useful for one of you guys… :)

Stephen_A_Marsh
Newbie
Posts: 4
Joined: Sun Jul 09, 2017 11:14 am

Re: Select spot color by regular expression

Post by Stephen_A_Marsh » Wed Apr 15, 2020 3:07 pm

Case insensitive: (?i)

Code: Select all

(?i)laser
would select:

laser
Laser
LASER
lASER
etc.

User avatar
Terkelsen
Advanced member
Posts: 242
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Select spot color by regular expression

Post by Terkelsen » Thu Apr 16, 2020 3:38 pm

If you like to play around with regular expressions, thats fine, but there is already a standard action in PitStop that will let you select spot colours from a list and it can even be case insensitive :-)
Skærmbillede 2020-04-16 kl. 15.33.32.png
Skærmbillede 2020-04-16 kl. 15.33.32.png (39.77 KiB) Viewed 693 times

Post Reply