on 2012 Oct 08 6:27 PM
select case when 'DR DREW J' regexp '^SR\\s.*' then 'Y' else 'N' end;
Result: 'Y'
s/b 'N'.
Works correctly with:
select case when 'DR DREW J' regexp '^TR\\s.*' then 'Y' else 'N' end; Result: 'N'
select case when 'DR DREW J' regexp '^sR\\s.*' then 'Y' else 'N' end; Result: 'N'
select case when 'DR DREW J' regexp '^DR\\s.*' then 'Y' else 'N' end; Result: 'Y'
I have confirmed that this is a bug in SQL Anywhere's REGEXP processing for ^. I believe this bug affects all versions for SQL Anywhere 11 and 12.
In this context, the ^ is unnecessary, since REGEXP matches the whole string. As a work around, you can remove the unnecessary ^ from the regular expression and the regular expression matching should behave correctly.
I have created engineering issue 721070 to track this issue and I will post an update once I know what build numbers will contain the fix.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The fix for this issue will appear in 12.0.1.3803 (or higher) as well as 11.0.1.2885 (or higher).
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.