Comments
3 comments
-
Hi
We use the standard .NET regular expression library (System.Text.RegularExpressions I believe) to implement this functionality and we do validate the expressions entered to ensure they are well-formed. For example, entering [[ will display an error message 'Not a valid regular expression'.
Another option is to use free third-party RegEx creation/testing applications.
http://www.ultrapico.com/Expresso.htm
http://www.regexbuddy.com/
Does this sound adequate? If not then I will definitely raise an enhancement request.
Regards
Chris -
Unfortunately, simply checking the regular expression syntax doesn't tell the user if the regular expression will identify the desired text.
Example: I want to filter out long-running query alerts caused by xp_sqlmaint. Depending on which server the job is running, xp_sqlmaint may be entered in the TSQL code as xp_sqlmaint or xp_SQLMaint. Will (?i)xp_sqlmaint work for the regex filter? Do I need to specify xp_[Ss][Qq][Ll][Mm]aint? A syntax check alone does not tell me the answer.
A third-party regex application could work. That's why I originally suggested the regex tester on regexlib.com (your help file already has a link to regexlib.com). The problem is that regex testers have configuration options for things such as case-sensitivity. As a DBA (not a .NET coder), I have no idea what options I should set on a third-party testing tool so it emulates the .NET regex library.
I would appreciate an enhancement request that at least identifies the settings for a given third-party regex tester that will guarantee that tests performed there will behave the same way in the SQL Monitor software. This will prevent a lot of trial and error when tuning SQL Monitor alerts.
BTW, regexbuddy is very reasonably priced at $40, but it's not free. -
Hi
An enhancement request has been raised (ref SRP-3143). We'll investigate and see what options are open to us.
Thanks for the feedback.
Chris
Add comment
Please sign in to leave a comment.
This enhancement would prevent guessing about RegEx syntax that might be supported by the SQL Monitor RegEx engine. Right now, I'm left with entering a RegEx expression and waiting until the situation in which the alert would normally be raised to see if my RegEx actually worked.