Community discussions

MikroTik App
 
bobwalker
just joined
Topic Author
Posts: 23
Joined: Sun Apr 03, 2011 6:07 am

How to match "$" in a string?

Fri Dec 16, 2011 11:26 am

How to match "$" in a string?

I couldnt input "\\$" in layer7 regexpression in terminal, How to deal with it?

I want to make a script, I am blocked on my way for it .

Thanks.
Last edited by bobwalker on Fri Dec 16, 2011 2:17 pm, edited 1 time in total.
 
User avatar
dasiu
Trainer
Trainer
Posts: 231
Joined: Fri Jan 30, 2009 11:41 am
Location: Reading, UK
Contact:

Re: How to match "$" in a string?

Fri Dec 16, 2011 11:36 am

Maybe "\\\$" (if you want to receive "\$" inside the regexp)? First backslash means to leave the second backslash without its "special" meaning. So you need third backslash, that will work on $ ;). But then you will be looking for "\$". If you want to look for just $ - I think "\$" is enough :).
 
bobwalker
just joined
Topic Author
Posts: 23
Joined: Sun Apr 03, 2011 6:07 am

Re: How to match "$" in a string?

Fri Dec 16, 2011 12:45 pm

Maybe "\\\$" (if you want to receive "\$" inside the regexp)? First backslash means to leave the second backslash without its "special" meaning. So you need third backslash, that will work on $ ;). But then you will be looking for "\$". If you want to look for just $ - I think "\$" is enough :).

thanks a lot

Who is online

Users browsing this forum: kosmipt, stef70 and 105 guests