Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Help with a regex for user recognition


Hello there!

I'm in need of your kind help regarding a simple regex that is turning me crazy!

I want to identify a user name placed in this tag "<nsX:referenceFournisseur>...</nsX:referenceFournisseur>"

My problem is that the X is a number between 0 and 9 so I can't just select the Taf because it will return only a few values.

I tried this regex : in the Tag S:Body : \(<ns[0-9]*:referenceFournisseur>.*</ns[0-9]*:referenceFournisseur>\)
but it returns the whole tag + value (e.g. : <ns2:referenceFournisseur>0082960389</ns2:referenceFournisseur> )

I tried to use the following one "\(>[0-9A-Z]\{10,13\}<\)" but it returns a lot of everything...

Do you have any hint so I can have only the value I am looking for?

I must say that I'm a real beginer with regex usage... it doesn't help...

Thanks a lot in advance for your help!

Best regards,




OK, found it here :

The correct regex is


Now I found out that depending on the operation, it can be "ns[0-9]" or "res"...

So my final idea would be


For a better understandign, here is what helped me:

Start with:


round brackets you point what should be reported, in square specify
unwanted characters and in curly, how many times they can occur.

Thank you @Adam Piotrowicz !


So you are not crazy?

I'll finally stay out of the mental hospital for now 😄


I think I over reacted, OK I have the value in the Console, but I still have the IP address only in the CAS if I use the "User name" Dimension...

Is it normal???


Doesn't work @Janusz Dabrowski .

I'll stick with my complicated-but-working regex 🙂


Not working either without the \ before the round brackets...

Using the regex I proposed, I have the correct results in the Console, so it should appear in the CAS, right?

Please mind I also asked you to add "\" before "/".

To be frank only now I recognized you are referring to XML (or SOAP?) over HTTP, not just HTTP decode. Example you referred to was specific to HTTP decode so I thought you want to use the same one.

If I'm not mistaken for XML/SOAP over HTTP decode you need to point specific tag where username is carried, and Regex can help you to extract a specific string from within the tag. Otherwise you can't extract any other parameter (like operation name) if you hog whole tag like you proposed. New XML decode in 12.4 will address this limitation.

More investigation would require access to Requests / Response pairs and better understanding of what is to be extracted.

Hi Janusz,

Yes, sorrys, I fogrot to say I am using SOAP over HTTPS decode!

I am pointing the "S:Body" tag, witch is the only one that doesn't change from an operation to another.

Otherwise, depending on the type of response, the tag begining changes.

It might be "ns[1-9]:referenceFournisseur" or "mis:referenceFournisseur" or "res:referenceFournisseur"...

So, if I select the correct tag for the first operation, it won't match the second one!

tried to copy/paste your regex in the Pattern field using the Wizard to
edit the Software Service, but then, nothing is recognized.

Using the regex that I wrotte returns the correct result in the Console but nothing in the CAS 😞

Thanks a lot for your help!


Is ADS server mandatory in order to have the user name in my CAS reports?

I'm really on my way to the hospital finally :'(

No, it's not necessary.

OK thanks.

I don't understand why I can't see them in my CAS reports then...

Maybe should I use another Dimension ?

Is it showing up in zdata file?



Since the actual tag name (referenceFournisseur) is constant and the only thing that changes is the XML namespace (nsX:), you can just specify *:referenceFournisseur as the tag name and skip the regex entirely, i.e. configure it the following way:

Tag: *:referenceFournisseur
Pattern: (leave empty)

The *:tagName is a special syntax that accepts all tags named tagName regardless of the XML namespace (i.e. the string before the colon).


Sandrine, did sulution proposed by Wojtek helped ? If positive I'd remove my other suggestions. Best, J