- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-24-2016 12:00 PM
I have two easy questions regarding CSS scripting:
1) Is there any way to match "something between (...) OR nothing? I mean:
Trigger-Template:
A
...
B
matches
A
1
2
B
or
A
sdfsdf
B
, but not...
A
B
Would "...|" work?
2) Is there any way to match i.e. three lines in a Trigger template, matched in ANY order? ( I mean, without dividing script in more triggers...) i.e. writing Trigger template that matches A & B & C in any order even with more lines:
A
B
C
C
B
A
A
lklkljk
B
C
should match...
Regards & thanks in advance.
Re: Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-24-2016 02:44 PM
For 1 you can use the following regex
(?<=A)(\S*)(?=B)
For 2
You can create a Trigger Variable as a regex
$test /(A|B|C)/
Don't forget about NetMRI RegEx Tester
Sif
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-25-2016 10:48 AM
Second solution would match an OR expression. Isn'it? I mean A or B or C.
What I need is A and B and C lines in any order.
Thanks in advance.
Re: Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-29-2016 10:59 AM
Can you give me a config example
Sif
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Two simple doubts... CSS Scripting
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-29-2016 11:56 AM - edited 03-09-2016 08:41 AM
Thanks.They sent me this solution:
/^(?=.*(FOG))(?=.*(HOUSE))/gms
matches FOG & HOUSE even in different lines & different order.
Thanks anyway.
Re: Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-02-2016 07:46 AM
That won't work in NetMRI
"gms" if you show me the extact config, I'm sure I have a script already for it.
Or are you trying to build a policy?
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-09-2016 09:08 AM
I'trying to build a CCS script just to match all this cases (just looking AAA & BBB on different ines)
AAA
sdasasd
BBB
AAA
BBB
BBB
AAA
BBB
asdsadas
adsdsa
AAA
I'm solving it now with two trigger outputs to check if "AAA"exists (trigger 1) and to check if "BBB" exists, but it dows not scale.
Thanks in advance.
Re: Two simple doubts... CSS Scripting
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-10-2016 06:49 AM
Try making the Trigger-Template look like this:
AAA
...
BBB
the ... should equate to "one or more lines" (note, not zero or more).
Thanks,
- Chris