Am Mon, 1 Oct 2007 21:05:06 +0900
schrieb kazaam <kazaam / oleco.net>:

> Hi again,
> I need to parse a line like this here:
> 
>        myoverlook://thatstrue@blablabla
> 
> I need at the end just thatstrue. So I wrote for the beginning:
> 
>       result = overlook.scan(/myoverlook://(.+?)\n/m)
> 
> Of course this doesn't work because of the // which are special
> charachters in a regexpr. But how can I tell that they shoudln't be
> treated as specialcharachters? Is there an escape charachter? I tried
> it so:
> 
>       result = overlook.scan(/myoverlook:\/\/\(.+?)\n/m)
> 
> but this throws an error:  unmatched ): /myoverlook:\/\/\(.+?)\n/
> 
> What's the correct synthax for this?
> 
> bye

You escaped the ( to, so that your cloasing ) is unmatched...

/myoverlook:\/\/\(.+?)\n/m <- yours
/myoverlook:\/\/(.+?)\n/m <- more correct (untested)