Hi everyone,
i'm trying to make a switch in a flow using regex matching on job.name.
for example
if i have a job called 123.MICKEY
and the regex .*MICKEY.*
There is the match
but if i use .*mickey.* it is not
this is because MICKEY in job.name is UPPERCASE....
so, i look at the the reference guide i saw that using /.*mickey.*/i there would be the match for all cases
But it seems that this syntax won't work on switch, neither the /.*MICKEY.*/i match the job.name now.
Any help?
thank you
RegEx Case Insensitive
Re: RegEx Case Insensitive
/regex/i is something you use in scripting. You do not specify it but I am assuming you are using a condition with variables with [Job.Name] on the left-hand side "Matches" as an operator and the regular expression on the right-hand side. Assuming I am right, what you need to do is this: convert the job name to lowercase using the feature in the variables pane so you get [Job.Name:Case="lower"], operator "Matches", regex: .+mickey
You can of course also convert to uppercase and match .+MICKEY
You can of course also convert to uppercase and match .+MICKEY
Re: RegEx Case Insensitive
Hi Freddy thank you so much for your help.
yes i'm using the command "define condition with variables.
It works, forcing the job.name to upper o lower case the file matches.
Thank you again
bye
yes i'm using the command "define condition with variables.
It works, forcing the job.name to upper o lower case the file matches.
Thank you again
bye
-
- Newbie
- Posts: 8
- Joined: Fri Feb 26, 2016 5:04 pm
Re: RegEx Case Insensitive
Thanks freddyp, that's a good tip! While it is a relatively simple workaround, a dedicated flag — maybe a checkbox or separate option like "matches (case insensitive)" — would be easier to find, just saying