title: Check if string contains certain characters
body: <p>I'm trying to check if the login being inserted into employee table is given in a certain format, which is: the first letter is strictly given - x, then 5 letters and two numbers =>  xlogin00.</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER check_login
  BEFORE INSERT OR UPDATE OF login ON employee
  FOR EACH ROW
  DECLARE
      xlogin00 employee.login%TYPE;
      prefix VARCHAR2(1);
      name VARCHAR2(5);
      number VARCHAR2(2);
  BEGIN
  xlogin00 := :new.login;
  prefix := substr(xlogin00,1,1);
  name := substr(xlogin00,2,5);
  number := substr(xlogin00,7,2);
  if(LENGTH(xlogin00) != 8) then
      Raise_Application_Error (-20203, 'Error');
  end if;
  if(prefix != 'x') then
      Raise_Application_Error (-20204, 'Error');
  end if;
  if NOT REGEXP_LIKE(name, '[^a-z]') then
      Raise_Application_Error (-20204, 'Error');
  end if;
  if NOT REGEXP_LIKE(number, '[^0-9]') then
      Raise_Application_Error (-20204, 'Error');
  end if;
  END;
  </code></pre>
  
  <p>The only thing that seems to work in my code is <code>if(prefix != 'x')</code>. Other stuff doesn't work at all. What am I doing wrong?</p>