0

I am dealing with a table which has two columns, first_name and last_name which are set to be non casespecific unicode columns.

case when (REGEXP_SIMILAR(trim(first_name),'.*[\u0000-\u017F]+.*','i') = 1 
            or 
            REGEXP_SIMILAR(trim(first_name),'.*[\uFF00-\uFFEF]+.*','i') = 1) 
     then 'Y' else 'N' end allowed_y_n

With the help of the above query i am trying to identify and flag latin names with accents in those columns.

But i am facing the following error, The pattern specified is not a valid pattern.

Any help here is appreciated, TIA

kgr
  • 23
  • 4
  • 1
    You can [this approach](https://stackoverflow.com/a/64281053/2527905) to decompose accented characters and then search for accents using `'[\x{0300}-\x{036F}]'` – dnoeth May 31 '23 at 12:08

1 Answers1

1

Teradata uses Perl 5 syntax and semantics.

For Perl use \x{....} instead of \u.

So your regex should look like this:

.*[\x{0000}-\x{017F}]+.*
tobifasc
  • 681
  • 5
  • 17