I am starting with Postgre Regular Expressions, working on PostgreSQL 8.3 version.
I have a table of records as following:
record
-----------
a
ab
abc
123abc
132abc
123ABC
abc123
4567
5678
6789
I was going through a simple tutorial: www.oreillynet.com. Everything seemed clear to me until I came to the following query:
SELECT record FROM myrecords WHERE record ~ '[^0-9]';
The tutorail says:
this expression returns strings that don't include digits.
But it returned following output to me:
output
------
a
ab
abc
123abc
132abc
123ABC
abc123
Can anyone explain me this behaviour, please? I am then struggling with another expression on that site trying to exclude strings that include digits AND lower-case letters in the same string.