Re: Pattern matching....

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steve Wolfe" <steve(at)iboats(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Pattern matching....
Date: 2002-02-08 23:06:40
Message-ID: 8053.1013209600@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Steve Wolfe" <steve(at)iboats(dot)com> writes:
> Here's a question... in Perl, I could do a pattern match like this:
> =~ /$var[A-Z]/
> In PG, I can do something similar, matching a field name:
> ~* my_field
> But how do I add the "[A-Z]" to it?

Uh, what's wrong with

~* (my_field || '[A-Z]')

Or am I missing the point?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Wolfe 2002-02-08 23:27:53 Re: Pattern matching....
Previous Message Edwin Grubbs 2002-02-08 22:53:36 Re: foreign keys and transactions