Morton Goldberg
7/19/2006 1:25:00 AM
Try it with
arg1 = "(1)a"
arg2 = '\(1\)a'
The problem is that arg2 is converted to a regular expression by
"match" and "(" and ")" are special characters in regular expressions
and, therefore, must be escaped.
Regards, Morton
On Jul 18, 2006, at 8:57 PM, Volkan Civelek wrote:
> arg1 = "(1)a"
> arg2 = "(1)a"
>
> if arg1.match(arg2)
> puts "Matched"
> else
> puts "Don't Matched"
> end
>
> gives me "Don't Matched" ??
>
> Regards,
> Volkan