Users are discussing using REGEX in triggers and one user asks for help from others who may have experience with this. There is also a link to a REGEX tester and an error is encountered. Some confusion arises around different versions and escaping values. There is a VSO and a workaround is suggested in the meantime.
Read the entire ‘Trouble with REGEX in ControlUp Triggers’ thread below:
Is there any Documentation on using REGEX in triggers? I tried unsuccessfully a few years back and still seem to be struggling for a fairly simple expression.
8.[0-9].[01]-\d{8}|*{8} – I tried with a / in front and without.
Link to REGEX Test: https://regex101.com/r/1Ewucr/1
This is the trigger and the error:
Maybe @member @member @member or @member have experience with this?
AFAIK it uses "standard" regex (I’m not sure which of the subtly different flavours but it doesn’t look like you’re using anything that differs between them.
Can you give an example of the string you’re trying to match?
On my laptop I’ve got version 8.14.0.12437220870 of the HZ client so the 8.[0-9]. isn’t going to match that because it’s looking for 8.x. where x is a single digit but are you trying to match older client versions?
The regex101 link Matt shared includes some of the values they’re trying to match. The first block should be matched. The 2nd block should not.
For CU engineers: It seems that we’re doing some escaping on these regex values that we shouldn’t do. We have a VSO on this. See VSO 234719 and/or ZD 41082
We’ve worked around it by using values we do not seem to try to escape.
Continue reading and comment on the thread ‘Trouble with REGEX in ControlUp Triggers’. Not a member? Join Here!
Categories: All Archives, ControlUp for VDI, ControlUp Scripts & Triggers