Re: CONDITIONAL QUESTION
Posted: Mon Feb 24, 2025 6:41 pm
Hi artjuice,
For reference I use https://regex101.com/ with PCRE2 (PHP >=7.3) when I test my regexes. So this is a good start so you know your regex is corret. And as @emcodem points out, you don't need the regext start/stop slashes. However, you do need to set if you want case insensitive in the regex function. So your correct function would be: $regext("%s_original_name%","(?i)^dgtl_"). However, this function will extract the string as opposed to testing if it matches.
To test, just add a single conditional node and submit the source to it. Take a look at the two tests below. They do the exact same thing but with two different approaces. You CAN use both just for the heck of it but I think the first one match your usecase best. Hope this helps
-steinar
For reference I use https://regex101.com/ with PCRE2 (PHP >=7.3) when I test my regexes. So this is a good start so you know your regex is corret. And as @emcodem points out, you don't need the regext start/stop slashes. However, you do need to set if you want case insensitive in the regex function. So your correct function would be: $regext("%s_original_name%","(?i)^dgtl_"). However, this function will extract the string as opposed to testing if it matches.
To test, just add a single conditional node and submit the source to it. Take a look at the two tests below. They do the exact same thing but with two different approaces. You CAN use both just for the heck of it but I think the first one match your usecase best. Hope this helps

-steinar