SIMILAR TO generates an error when the correct pattern
------------------------------------------------------

                 Key: CORE-4116
                 URL: http://tracker.firebirdsql.org/browse/CORE-4116
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 2.5.2 Update 1
            Reporter: Simonov Denis


SELECT
  CASE
    WHEN '1.02,7' SIMILAR TO '[0-9]{1,2}\.[0-9]{2},[0-9]{1,2}' ESCAPE '\'
    THEN 1
    ELSE 0
  END AS B
FROM RDB$DATABASE

Invalid String.
Invalid ESCAPE sequence.

if execute query

SELECT
  CASE
    WHEN '1.02,7' SIMILAR TO '[0-9]{1,2}\([0-9]{2},[0-9]{1,2}' ESCAPE '\'
    THEN 1
    ELSE 0
  END AS B
FROM RDB$DATABASE

B
---
1       -- it's correct

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to