cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
838
Views
0
Helpful
3
Replies

ACE Probe regex and escaping Parenthesis

kollross
Level 1
Level 1

I'm trying to setup a ACE probe that expects a return of

(server.domain.com) EXISTS=TRUE,AVAILABLE=TRUE,ACTIVE=TRUE

But it doesn't appear that I can use Parenthesis inside a regex.  I've tried escaping as well.

expect \(server\.domain\.com\) EXISTS=TRUE,AVAILABLE=TRUE,ACTIVE=TRUE

% invalid command detected at '^' marker.   Pointing at the (

But this doesn't work either.  Any ideas?

3 Replies 3

Kanwaljeet Singh
Cisco Employee
Cisco Employee

Hi,

Please try this. This should work:

expect regex [(]server.domain.com[)] EXISTS=TRUE,AVAILABLE=TRUE,ACTIVE=TRUE.

Also, download regex builder freeware for hit and trial in situations like this. These tools are pretty handy when it comes matching texts with regex.

Regards,

Kanwal

Thanks that worked...I think (at least it excepted it as valid syntax.   Though I had to add a \ before the space on Exists.

Would I need to escape the periods in server.domain.com?

i.e.

server\.domain\.com

       Hi,

Hi,

If it has taken it, it should match the response from server.  Is it still not matching?

    

If you look at the regex builder below, the regex matches the response which is expected from the server. So ACE should be able to match it.

Also, you can try and put \ before dots but not sure. In my opinion it should work fine with what we have put in already. If it doesn't we will have to use hit and trial. Let me know if you need this regex builder. You can download it from google though. In any case i just attached it.