| От | Karsten Hilbert |
|---|---|
| Тема | regex help wanted |
| Дата | |
| Msg-id | 20130425141127.GH3802@hermes.hilbert.loc обсуждение |
| Ответы |
Re: regex help wanted
|
| Список | pgsql-general |
Hi,
I am in the process of converting some TEXT data which I try
to identify by regular expression.
What I don't understand is: Why does the following return a
substring ?
select substring ('junk $<allergy::test::99>$ junk' from '\$<[^<]+?::[^:]+?>\$');
I would have thought the '::[^:]+?>' part should have meant
after two ":"s
match at least one character
except any further ":"s
until the next ">"
I don't find the flaw in my thinking. Can anyone help ?
(Sure, it is not PostgreSQL-specific yet I need to run this
in PostgreSQL on data migration.)
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера