Oracle OWA_PATTERN
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Oracle Web Application Server Regular Expression, Pattern Matching, Support Utilities with 3 fundamental subprograms: AMATCH, MATCH, and CHANGE.
AUTHID DEFINER
Data Types TYPE pattern IS TABLE OF VARCHAR2(4) INDEX BY BINARY_INTEGER;
Dependencies
DBMS_OUTPUT OWA_MATCH OWA_TEXT
DBMS_STANDARD    
Documented No
First Available Not known
Pragma PRAGMA SUPPLEMENTAL_LOG_DATA(default, READ_ONLY);
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/pubpat.sql
{ORACLE_HOME}/rdbms/admin/privpat.sql
Subprograms
 
AMATCH
Provides the flexibility to specify *WHERE* in the string to search for a pattern and also gives more information in return by indicating *WHERE* in the string the end of the pattern was found

Overload 1
owa_pattern.amatch(
line     IN VARCHAR2,
from_loc IN NUMBER,
pat      IN VARCHAR2,
flags    IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
Overload 2 owa_pattern.amatch(
line     IN     VARCHAR2,
from_loc IN     NUMBER,
pat      IN OUT sys.owa_pattern.pattern,
flags    IN     VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
Overload 3 owa_pattern.amatch(
line     IN  VARCHAR2,
from_loc IN  NUMBER,
pat      IN  VARCHAR2,
backrefs OUT sys.owa_text.vc_arr,
flags    IN  VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
Overload 4 owa_pattern.amatch(
line     IN     VARCHAR2,
from_loc IN     NUMBER,
pat      IN OUT sys.owa_pattern.pattern,
backrefs    OUT sys.owa_text.vc_arr,
flags    IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
 
CHANGE
Provides the ability to change occurrences of a matched pattern to a new string

Overload 1
owa_pattern.change(
line     IN OUT VARCHAR2,
from_str IN     VARCHAR2,
to_str   IN     VARCHAR2,
flags    IN     VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
Overload 2 owa_pattern.change(
line     IN OUT VARCHAR2,
from_str IN     VARCHAR2,
to_str   IN     VARCHAR2,
flags    IN     VARCHAR2 DEFAULT NULL);
TBD
Overload 3 owa_pattern.change(
mline    IN OUT sys.owa_text.multi_line,
from_str IN     VARCHAR2,
to_str   IN     VARCHAR2,
flags    IN     VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
Overload 4 owa_pattern.change(
mline    IN OUT sys.owa_text.multi_line,
from_str IN     VARCHAR2,
to_str   IN     VARCHAR2,
flags    IN     VARCHAR2 DEFAULT NULL);
TBD
 
GETPAT
Undocumented owa_pattern.getpat(
arg IN     VARCHAR2,
pat IN OUT sys.owa_pattern.pattern);
TBD
 
MATCH
Can extract the matched values from the parenthesized patterns

Overload 1
owa_pattern.match(
line  IN VARCHAR2,
pat   IN VARCHAR2,
flags IN VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN;
TBD
Overload 2 owa_pattern.match(
line  IN     VARCHAR2,
pat   IN OUT sys.owa_pattern.pattern,
flags IN     VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN;
TBD
Overload 3 owa_pattern.match(
line     IN  VARCHAR2,
pat      IN  VARCHAR2,
backrefs OUT sys.owa_text.vc_arr,
flags    IN  VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN;
DECLARE
 str        dbms_id := 'Today is 03/15/21';
 components owa_text.vc_arr;
BEGIN
  IF (owa_pattern.match(str, '(\d\d)/(\d\d)/(\d\d)', components)) THEN
    dbms_output.put_line('The month is '||components(1));
    dbms_output.put_line('The day is '||components(2));
    dbms_output.put_line('The year is '||components(3));
  END IF;
END;
/
The month is 03
The day is 15
The year is 21

PL/SQL procedure successfully completed.
Overload 4 owa_pattern.match(
line     IN     VARCHAR2,
pat      IN OUT sys.owa_pattern.pattern,
backrefs    OUT sys.owa_text.vc_arr,
flags    IN     VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN;
TBD
Overload 5 owa_pattern.match(
mline IN  sys.owa_text.multi_line,
pat   IN  VARCHAR2,
rlist OUT sys.owa_text.row_list,
flags IN  VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN;
TBD
Overload 6 owa_pattern.match(
mline IN     sys.owa_text.multi_line,
pat   IN OUT sys.owa_pattern.pattern,
rlist    OUT sys.owa_text.row_list,
flags IN VARCHAR2 DEFAULT NULL)
RETURN BOOLEAN;
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
OWA
OWA_CACHE
OWA_COOKIE
OWA_CUSTOM
OWA_CX
OWA_IMAGE
OWA_MATCH
OWA_OPT_LOCK
OWA_SEC
OWA_TEXT
OWA_UTIL
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx