Re: [SQL] Regular Expression Matching problem...

2006-01-08 Thread Mario Splivalo
On Wed, 2006-01-04 at 10:00 -0700, Michael Fuhr wrote: > What Andreas is saying is that the patterns in the table have too > many backslashes. The original query was > > test=> select '+385911234567' ~ '^\\+38591\\d{7}$'; > ?column? > -- > t > (1 row) > > but if you select just the p

Re: [SQL] Regular Expression Matching problem...

2006-01-04 Thread Michael Fuhr
On Wed, Jan 04, 2006 at 03:50:31PM +0100, A. Kretschmer wrote: > Try this: > > test=# select '+385911234567', operator_phonenumber_pattern, '+385911234567' > ~ replace(operator_phonenumber_pattern,'','\\') from operators; >?column?| operator_phonenumber_pattern | ?column? > --

Re: [SQL] Regular Expression Matching problem...

2006-01-04 Thread A. Kretschmer
am 04.01.2006, um 15:08:45 +0100 mailte Mario Splivalo folgendes: > I have a table containing regular expresion patterns for matching phone > numbers with the mobile operators. > > For instance, my phone number is '+385911234567', and the regexp for > this mobile operator is: "^\+38591\d{7}$". >

[SQL] Regular Expression Matching problem...

2006-01-04 Thread Mario Splivalo
I have a table containing regular expresion patterns for matching phone numbers with the mobile operators. For instance, my phone number is '+385911234567', and the regexp for this mobile operator is: "^\+38591\d{7}$". Now, when I do a regexp match in a single select, it behaves as expected: oct