Regex Routines

You can use regex routines to search for patterns, manipulate text strings, and configure tracing.

Example data

Some examples for the regex functions use the tongue_twisters table:
create table
      tongue_twisters  (     id
           int,     twister lvarchar  );
The tongue_twisters table contains the following data:
select id, twister
from   tongue_twisters  
order by id;

id       246 
twister  Sally sells sea shells by the sea shore. But if Sally sells sea
         shells by the sea shore then where are the sea shells Sally sells? 
 
id       278
twister  Peter Piper picked a peck of pickled peppers. A peck of pickled
         peppers Peter Piper picked.  Peter Piper picked a peck of pickled
         peppers, Where's the peck of pickled peppers Peter Piper picked?

id       286 
twister  If two witches would watch two watches, which witch would watch 
         which watch? 

id       301  
twister  Fuzzy Wuzzy was a bear, Fuzzy Wuzzy had no hair, Fuzzy Wuzzy 
         wasn't very fuzzy, was he? 

id       306 
twister  I slit a sheet, a sheet I slit, and on that slitted sheet I sit.

id       313  
twister  Betty bought some bitter butter and it made her batter bitter, so
         Betty bought some better butter to make her bitter batter better.

id       335
twister  How much wood could a woodchuck chuck if a woodchuck could chuck
         wood? A woodchuck could chuck as much wood as a woodchuck would
         chuck if a woodchuck could chuck wood. 

id       361  
twister  She sells seashells on the seashore. The seashells she sells are 
         seashore seashells.