Re: SELECT substring with regex

From: Emils <gnudiff(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: SELECT substring with regex
Date: 2006-07-10 05:11:47
Message-ID: 9dcb6fa40607092211g5e0e2099x3e6d9d3c56977a02@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

2006/7/7, T E Schmitz <mailreg(at)numerixtechnology(dot)de>:
>
> valid entries would be:
> "28mm F2.8" (prime lens)
> "30-70mm F4" (zoom lens)
> "30-70mm F2.8" (zoom lens)
> "30-100mm F4.5-5.6" (zoom lens with variable speed)

If these are the cases, wouldn't the regex be simply:

"^[\d\-]+mm" for BASE

"^[\d\-]+mm (.+)$" for SUFFIX

Or are you having to deal with malformatted data too (like "30 -70mm"
or "28 mm ")?

Emils

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Phillip Smith 2006-07-10 07:21:53 Re: Select Maths
Previous Message Michael Fuhr 2006-07-09 18:10:10 Re: information_schema for all users