The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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'

asked 08 Oct '12, 17:27

scott97007's gravatar image

scott97007
1503411
accept rate: 0%

edited 09 Oct '12, 17:11

Ian%20McHardy's gravatar image

Ian McHardy
2.6k22945

2

12.0.0.2483 is really an old version (was it the v12 GA) - I would test with a current 12.0.1 EBF (or read the according EBF readme) to see if this is corrected... cf. Breck's according list here...

(09 Oct '12, 03:27) Volker Barth

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.

permanent link

answered 09 Oct '12, 15:15

Ian%20McHardy's gravatar image

Ian McHardy
2.6k22945
accept rate: 39%

2

The fix for this issue will appear in 12.0.1.3803 (or higher) as well as 11.0.1.2885 (or higher).

(09 Oct '12, 17:09) Ian McHardy
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×33
×2

question asked: 08 Oct '12, 17:27

question was seen: 637 times

last updated: 09 Oct '12, 17:11