Re: Regular expression problem

From: <mattsteel_at_hotmail.it>
Date: Thu, 12 Feb 2009 01:57:05 -0800 (PST)
Message-ID: <c4daf5a6-13a1-4a07-94b1-00ea3487b6e5_at_s20g2000yqh.googlegroups.com>



I beg you pardon:

The correct code I used is the following (note the missing double backslash).

begin
  if owa_pattern.match(

          'library\source\jtoru436.pxe',
          '(source|include)\\jtor.*436[.].*')
  then
    dbms_output.put_line('Found');
  else
    dbms_output.put_line('NOT FOUND');
  end if;
end;

The point is that matching with '(source)\\jtor.*436[.].*' returns "Found" !

On 12 Feb, 10:51, mattst..._at_hotmail.it wrote:
> I'm using Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit
> Production With the Partitioning option JServer Release 9.2.0.7.0 -
> Production.
>
> I'm in trouble using owa_pattern Oracle standard package.
>
> Trying the following block:
>   begin
>   if owa_pattern.match(
>           'library\\source\\jtoru436.pxe',
>           '(source|include)\\jtor.*436[.].*')
>   then dbms_output.put_line('Found');
>   else dbms_output.put_line('NOT FOUND');
>   end if;
>   end;
>
> the output is "NOT FOUND".
>
> The equivalent code written in Perl:
>
>   print "Found" if 'library\\source\\jtoru436.pxe' =~ m/(source|
> include)\\jtor.*436[.].*/;
>
> returns "Found".
>
> What should I think about  owa_pattern.match package ?
>
> Matt.
Received on Thu Feb 12 2009 - 03:57:05 CST

Original text of this message