Forum Discussion
Regex for variable monitor recv string
DevCentral, I have a regex ask.
I am trying to set up an http monitor that get this in the response "totalRows="3311"" I need to set up the recv string to accept any number from 1 to 9999 in the quotes.
Have tried:
totalRows=”[1-9][0-9]*”
totalRows=/”[1-9][0-9]*/”
and taken some other more desperate stabs in the dark I am too embarrassed to post. :)
Let me know if you have any ideas!
As always, Thanks in advance!!!
David Pasch F5-CTS
- crodriguezRet. Employee
Try:
totalReg=\"^([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9])$\"
Someone else might have a niftier way of doing it but this should work. Note it could be a pretty resource-intensive test. You will probably want to benchmark it to see what adjustments you want to make to the monitor's interval and timeout values.
- Stanislas_Piro2Cumulonimbus
I think this one should work
totalRows="[1-9][0-9]*"
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com