T.R | Title | User | Personal Name | Date | Lines |
---|
578.1 | | CSC32::BUTTERWORTH | Gun Control is a steady hand. | Wed Jan 25 1995 19:59 | 26 |
| >Is there a special character that we can use in a regular expression
>to make the test on the event text NOT case sensitive? Or perhaps
>a separate switch we can set?
Not quite. There is a way to match on totally uncase-sensitive ranges
of characters but you could *easily* create an event that literally
matches on *every possible string* if you aren't careful. Here's an
example. I want to match on the word THIS regardless of the case of the
characters. We would define the following regular expression:
[Tt][Hh][Ii][Ss]
To further spell it out - pun intended - this will match on all
possible case combinations of the string T H I S , e.g., This ThIs THIs
etc.
You can further expand this to include as many words as you want spaces
etc. So now we can further confuse everyone and make things even harder
to understand with this:
[Tt][Hh][Ii][Ss] [Ii][Ss] [Aa] [Tt][Ee][Ss][Tt]
Does your head hurt now? ;-}
Regards,
Dan
|
578.2 | Does not hurt | BRSOPI::STAES | Topless = No brains at all | Thu Jan 26 1995 09:12 | 3 |
| Any chance of seeing something like {anycase} matching implemented?
Nand.
|
578.3 | | OPG::PHILIP | And through the square window... | Thu Jan 26 1995 16:59 | 6 |
| Nand,
Its on the wishlist.
Cheers,
Phil
|
578.4 | | KERNEL::COFFEYJ | The Uk CSC Unix Girlie. | Wed Apr 12 1995 19:10 | 9 |
| Similar vein so I'll not create a new note......
Wishlisted already is that you can search on upper or lowercase characters for
exclusion -
is there also a request for being able to use numerics as well as alpha characters?
Or have I missed summat... seems you can't currently....
|
578.5 | | CSC32::BUTTERWORTH | Gun Control is a steady hand. | Wed Apr 12 1995 19:24 | 19 |
| >Wishlisted already is that you can search on upper or lowercase
>characters for exclusion -
Take a look at the earlier replies to this note for some ideas.
>is there also a request for being able to use numerics as well as alpha
>characters
If I understand the question then yes you can already use numeric
ranges like this
[0-9]
anywhere in a regular expression.
Regs,
Dan
|
578.6 | | KERNEL::COFFEYJ | The Uk CSC Unix Girlie. | Thu Apr 13 1995 16:49 | 26 |
| > Take a look at the earlier replies to this note for some ideas.
Yeah, ta - sorry didn't phrase it so clearly I was just mentioning that
as a quick way of explaining what we wanted to do with the numeric characters
I was asking after :-)
> If I understand the question then yes you can already use numeric
> ranges like this [0-9]
Hmm....... in which case I have a call from someone who believes there's a
problem with that if you're using the NOT ^ and it doesn't work properly
namely on the character combination 300 in his case as in
[^300]
Should he maybe be doing
[^3][^0][^0] if he wants to exclude anything like
DECserver300 message here....
?
|
578.7 | | CSC32::BUTTERWORTH | Gun Control is a steady hand. | Thu Apr 13 1995 19:15 | 31 |
| What exactly is or isn't happening?
I set up an experimental event with the following regular expression:
[^300] this is a test*^
The following strings will trigger the event
13456789 this is a test
sldkfj ds this is a test
so in general any possible combination of characters with the exception
of the number 3 and number 0 will trigger the event. This is exactly
what I expect to happen. The following strings will fail
0 this is a test
3 this is a test
123456789 this is a test
1222222333333 this is a test
0kjd fsf this is a test
as long as a 0 or 3 preceeeds the literal string "this is a test" it
will always fail.
Using the alternate construct of [^3][^0][^0] won't change the behavior
really. Rememebr that complement means "match on anything *but* the
complemented character(s)".
Regs,
Dan
|
578.8 | | KERNEL::COFFEYJ | The Uk CSC Unix Girlie. | Tue Jun 13 1995 12:59 | 23 |
| So I guess the question is
Can you get the test to exclude things with
300 in them but not 3 or 0 on their own?
So
"Node 37046 is unavailable"
would still show up but
"DECserver300 on line"
would be excluded.
Jo.
|