Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2003
    DC Metro

    Unanswered: help with regex using owa_pattern.match

    i have a procedure that goes through a column and runs a series of regular expressions. the script was originally written in C# but moved to the db, and i am experiencing some undesired behavior. here's a snippet of the code:

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>
    create or replace function PATTERN_CHANGE(v_string IN VARCHAR2)
    return varchar2 is
    Result varchar2(150);
    CNS VARCHAR2(16) := '[tdkgpbszfvmnlr]';
    Result := aglio_utils.strip_bad(LOWER(v_string));
    owa_pattern.change(Result, '(ce)', 'se');
    owa_pattern.change(Result, 'a(' || CNS || ')e$', 'ey&');

    owa_pattern.change(Result, 'e(' || CNS || ')e$', 'iy$1');




    if i enter the word "ane", i should receive back "eyn", however, what i get back is:

    i'm assuming that oracle's regex has some different quirks...but was hoping someone could provide some insight.

    the original code for this line:
    owa_pattern.change(Result, 'a(' || CNS || ')e$', 'ey&');
    looked like this in C#
    'a(' || CNS || ')e$', 'ey$1'

    note the $1, which was removed and replaced with the &...however, the following lines are still in the same format from the previous [C#] application.

    in a nutshell....

    if a word has a_e at the end of it, and that blank is filled with any of these:

    for the ane example, i want eyn back...any help?
    thanks in advance
    Last edited by aglio412; 09-30-04 at 10:57.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts