Forum Discussion

Raja_Intuit_262's avatar
Raja_Intuit_262
Icon for Nimbostratus rankNimbostratus
Nov 06, 2017

Receive String Error: How do i write a regular expression for the below string

I would like to know the regular expression for the below receive string

 

{"Job Server Health Check":{"healthy":true},"Quartz Scheduler Health Check":{"healthy":true},"deadlocks":{"healthy":true}}

 

I tried copying this directly and F5 gave an error saying invalid regular expression. I am new to Curl and regular expression in F5. Please help.

 

  • A Monitor Receive String should be a regex.

    However, you are trying to match the plain text response, but it contains characters that could be part of a regex. The solution is to escape the offending characters

    \{\"Job Server Health Check\":\{\"healthy\":true\},\"Quartz Scheduler Health Check\":\{\"healthy\":true\},\"deadlocks\":\{\"healthy\":true\}\}

    However, I'd be tempted to not try to match the entire string, and just look for

    \"Healthy\":true