Forum Discussion

am_gli's avatar
am_gli
Icon for Altostratus rankAltostratus
Aug 11, 2020

ASM - regex in Parameter Name

Hi,

 

I'm looking for a possibility to implement a dynamic parameter, that contains a string that may vary as parameter name itself.

 

It's something like this:

 

<soap:Envelope xmlns...>

<abcd:Envelope xmlns...>

<fghjkl:Envelope xmlns...>

 

I thought of creating a Wildcard Parameter like this:

 

<[a-zA-Z0-9]{2,15}:Envelope*

 

so it matches an alphanumeric, 2-15 chars long string.

Unfortunately it seems that you can't use any quantifiers in the parameter name (at least according to this thread from 11 years ago: https://devcentral.f5.com/s/question/0D51T00006i7VCi/regex-in-parameter-name )

 

Does anyone know if there is any solution to this problem by now?

Or if there is a possibility to do this in a syntax that is supported? (the 2-15 is not mandatory, could be more or less chars too)

 

Otherwise I'm afraid that I really have to follow the suggestion from this thread and add 14 different parameters, one for each length :(

 

Thanks in advance!

 

  • Hello,

     

    Did you try to create "Dynamic content value" parameter and define appropriate Extractions for it?

    I think it could be useful in your case.

     

    Thanks, Ivan

    • am_gli's avatar
      am_gli
      Icon for Altostratus rankAltostratus

      Hi,

       

      the problem is that it's not about the content of the parameter, but the parameter name itself.

      "Dynamic content value" just removes the content check options as far as I can see.

       

       

      • Ivan_Chernenkii's avatar
        Ivan_Chernenkii
        Icon for Employee rankEmployee

        Got it. Yes, it looks like I misunderstood you.

        What are you trying to achieve?

        May be you can simply create parameter <*:Envelope* wildcard parameter and disallow some metacharacters for parameter name?

         

        As I see, the only way how you can do it, is to create explicit parameter with "Dynamic parameter name" type, but this parameter can be defined only with Flow parameter level. So, if you have strictly defined flow (path from URL1 -> to URL2) and this parameter must be actual for it only, then you can use such approach

         

        Thanks, Ivan