Unanswered UAG - REGEX Syntax

  • Thursday, February 07, 2013 5:13 PM
     
     

    I have some general questions related to REGEX syntax and what is supported in the REGEX++ engine in UAG Version 4.0.2095.  I have read the 'Intelligent Application Gateway Advanced Configuration' guide ‘Regex++, Regular Expression Syntax’ section as well as the online UAG Regex guide, links below.  I have also read many technet posts as well as other UAG related information on non-Microsoft sites and there seems to be lots of misinformation and misguidance.  Unfortunately any SRA changes require a reactivation, which can be quite time consuming, in order to test whether or not a regex expression works as expected.

    http://download.microsoft.com/download/2/F/9/2F9D9113-B84B-4838-98A0-A3AEFA6608E2/IAG_AdvancedUserGuide.pdf

    http://technet.microsoft.com/en-us/library/dd282903.aspx

    Questions:

    1. Is it fact that the Regular Expression Syntax documented within those two links above covers the ONLY syntax that is supported?  I have read many UAG posts related to the “/n” (newline) character class shortcut however that is not documented at either link.
    2. I would like to test REGEX expressions quickly however I have found that there are many inconsistencies using any of these online sites, some have single/multi lines subject strings, some have greedy/non-greedy matches, etc..  I have also attempted to just use Notepad++ however some expressions appending the repeat “?” do not provide any matches.  What is the de-facto tool that UAG admins use to test REGEX expression?
    3. There is a section on Back References however there is a statement ‘Back references are only available if the expression is compiled with the flag regbase::bk_refs set.’  I don’t ever know where/how you apply those types of settings.  Within those documents there are actually six references to setting flags (regbase: :escape_in_lists, match_not_bow, match_not_eow, match_not_bob, match_not_eob, & match_any).  Are flags set globally?  Are flags set per regex expression?

    Any assistance, from someone who actually knows what they are talking about, would be much appreciated...

All Replies

  • Friday, February 08, 2013 5:11 PM
     
     
    Back in the Whale days (before Microsoft acquired Whale) there was a RegExEval.exe that you could drop on the server alongside the Regex++-3.31.dll and use to evaluate a regex expression against a string using the same actual DLL as the e-Gap/IAG code used.  Not sure if this regex tool would still work with UAG regex dll or if Microsoft is willing to distribute the tool to you, but maybe worth asking..
  • Friday, February 08, 2013 7:01 PM
     
     

    Mark,

    Thanks for the information, looks like that is an option for my question #2.  From your "Back in the Whale days' comment it appears you have been involved in the Whale/IAG/UAG game for some time, do you have any comments on my Question #1 or #3?

  • Friday, February 08, 2013 7:35 PM
     
     
    Yes, been focused on the product since June 2002. (thru june 2007 with Whale/Microsoft)  Seen hundreds of somewhat undocumented features and gotten explanations directly from the developers when i could.  Some were even things I requested and were developed for a particular need I had on a project.  And of course I've come up with my share of creative solutions using the flexibility the product allows.   But even with my 10.5 yrs experience the other 2 items never came up for me, so sorry to say I can't help on them.