title: PL/SQL: Find all cyrillic (or non-latin1) signs via regex
body: <p>I'm currently trying to figure out a way to output the IDs of all Rows within a table that contain any cyrillic (or non-latin-1) letters, no matter what column they're in
  I've inherited a script that uses cursors to iterate through the tables and columns and searches for the cyrillic signs via a regex statement using unistr(), but i can't figure out why it does not seem to be working anymore on our oracle 12 db</p>
  
  <p>The statement is as follows:</p>
  
  <pre><code>        stmt := 'select ID from '||table_name || ' where regexp_LIKE('||table_name||'.'||column_name||','||stmt_template|| ')'; 
  </code></pre>
  
  <p>table_name and column name should be selft explanatory, stmt_template is a template that is defined earlier and contains my problem. 'stmt' is used as follows (and works):</p>
  
  <pre><code>OPEN stmt_cursor for stmt;
      LOOP [some code]
  </code></pre>
  
  <p>The stmt_template is defined as follows and always throws me an error
  <code>
  stmt_template VARCHAR(32767) := '^[''||unistr(''\20AC'')||unistr(''\1EF8'')||''-''||unistr(''\1EF9'')||unistr(''\1EF2'')||''-''||unistr(''\1EF3'')||unistr(''\1EE4'')||''-''||unistr(''\1EE5'')||unistr(''\1ED6'')||''-''||unistr(''\1ED7'')||unistr(''\1ECA'')||''-''||unistr(''\1ECF'')||unistr(''\1EC4'')||''-''||unistr(''\1EC5'')||unistr(''\1EBD'')||unistr(''\1EAA'')||''-''||unistr(''\1EAC'')||unistr(''\1EA0'')||''-''||unistr(''\1EA1'')||unistr(''\1E9E'')||unistr(''\1E9B'')||unistr(''\1E8C'')||''-''||unistr(''\1E93'')||unistr(''\1E80'')||''-''||unistr(''\1E85'')||unistr(''\1E6A'')||''-''||unistr(''\1E6B'')||unistr(''\1E60'')||''-''||unistr(''\1E63'')||unistr(''\1E56'')||''-''||unistr(''\1E57'')||unistr(''\1E44'')||''-''||unistr(''\1E45'')||unistr(''\1E40'')||''-''||unistr(''\1E41'')||unistr(''\1E30'')||''-''||unistr(''\1E31'')||unistr(''\1E24'')||''-''||unistr(''\1E27'')||unistr(''\1E1E'')||''-''||unistr(''\1E21'')||unistr(''\1E10'')||''-''||unistr(''\1E11'')||unistr(''\1E0A'')||''-''||unistr(''\1E0B'')||unistr(''\1E02'')||''-''||unistr(''\1E03'')||unistr(''\0292'')||unistr(''\0259'')||unistr(''\022A'')||''-''||unistr(''\0233'')||unistr(''\01FA'')||''-''||unistr(''\021F'')||unistr(''\01F7'')||unistr(''\01F4'')||''-''||unistr(''\01F5'')||unistr(''\01E2'')||''-''||unistr(''\01EF'')||unistr(''\01DE'')||''-''||unistr(''\01DF'')||unistr(''\01CD'')||''-''||unistr(''\01D4'')||unistr(''\01BF'')||unistr(''\01B7'')||unistr(''\01AF'')||''-''||unistr(''\01b0'')||unistr(''\01A0'')||''-''||unistr(''\01A1'')||unistr(''\018F'')||unistr(''\0187'')||''-''||unistr(''\0188'')||unistr(''\0134'')||''-''||unistr(''\017f'')||unistr(''\00AE'')||''-''||unistr(''\0131'')||unistr(''\00A1'')||''-''||unistr(''\00AC'')||unistr(''\0009'')||unistr(''\000A'')||unistr(''\000D'')||unistr(''\0020'')||''-''||unistr(''\007E'')||'']*$'')';
  </code>
  This is supposed to be searching for a long list of cyrillic letters and other special characters, though it throws me the following:</p>
  
  <pre><code>ORA-00936: missing expression
  </code></pre>
  
  <p>I've already tried to search for everything not within the ascii table using</p>
  
  <pre><code>stmt_template VARCHAR(32767) :='''[^-~]''';
  </code></pre>
  
  <p>though this doesn't seem to give me the test-tuples I prepared (using some cyrillic characters as well as a € sign and stuff) but some rows that don't contain any 'illegal' characters</p>
  
  <pre><code>stmt_template VARCHAR(32767) := '''[^.' || CHR (1) || '-' || CHR (255) || ']'''; 
  </code></pre>
  
  <p>doesn't work either as it gives me the same as the above</p>
  
  <p>can anyone help me identify my mistake/typo or whatever error there is in the first regex statement? </p>
  
  <p>If you need any more information, please tell me, thx in advance</p>