Re: [SQL] postgres 6.3.2 and regexp
От | Guido Piazzi |
---|---|
Тема | Re: [SQL] postgres 6.3.2 and regexp |
Дата | |
Msg-id | Pine.LNX.3.96.990419124738.132B-100000@auckland.ik2gdx.ampr.org обсуждение исходный текст |
Ответ на | postgres 6.3.2 and regexp (Bill Brandt <brandtwr-pgsql@draaw.net>) |
Список | pgsql-sql |
On Sun, 18 Apr 1999, Bill Brandt wrote: > ERROR: regcomp failed with error repetition-operator operand invalid > > This happens anytime the text has a * as the first character. That's because in regular expressions '*' matches zero or more consecutive occurrences of the previous character, which can't be found when '*' is the first character in the string. It's not like unix wildcards. Maybe you should use 'test' instead of '*test*', because regular expressions match every string that has the regexp in it, regardless of what's before and after the regexp in the string. Moreover, regular expression matching is usually done the other way round, i.e. "SELECT * FROM table WHERE field ~ 'regexp';". Hope it helps... Guido -- Guido Piazzi - Piazza Crivelli, 3 - 20014 Nerviano MI - 0347 9690977 * better get into what you got to get into better get into it now no slacking please united nations ain't really united andthe organizations ain't really organized (Donovan, 1970)
В списке pgsql-sql по дате отправления: