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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general