From: Lucky Nl Date: 2012-04-14T03:37:13+09:00 Subject: Re: how to avoid escaping special chars after backslah in string " \\imp ".match(/ [|@|#|$|+|{|}|'|"|?|<|>|*|-|!|%|^|&|:|;|\|=|.|~|`|^|\]|\[|'|\\|\/|\|]imp /) when i am trying to match string around only one special char.it is returning matching bcz the reason escaping slash . " *$imp ".match(/ [|@|#|$|+|{|}|'|"|?|<|>|*|-|!|%|^|&|:|;|\|=|.|~|`|^|\]|\[|'|\\|\/|\|]imp /) it will not match .this is returned as i expected Vladimir wrote in post #1056383: > On 04/13/2012 09:01 PM, Roger Pack wrote: >> so what's your ideal syntax here? >> > if you need a avoid escaping completely you can use > > /heredoc/ > > myText =< Please Det \ \t \n \r ach and return this coupon with your payment. > Do not send cash or coins. > > Please write your name and account number on the check and > make checks payable to: > > Acme Corporation > > Thank you for your business. > DOC > > all characters will be saved as you print them without escaping -- Posted via http://www.ruby-forum.com/.