Re: SELECT substring with regex - Mailing list pgsql-sql

From Emils
Subject Re: SELECT substring with regex
Date
Msg-id 9dcb6fa40607092211g5e0e2099x3e6d9d3c56977a02@mail.gmail.com
Whole thread Raw
In response to Re: SELECT substring with regex  (T E Schmitz <mailreg@numerixtechnology.de>)
Responses Re: SELECT substring with regex  (T E Schmitz <mailreg@numerixtechnology.de>)
List pgsql-sql
2006/7/7, T E Schmitz <mailreg@numerixtechnology.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


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: information_schema for all users
Next
From: "Phillip Smith"
Date:
Subject: Re: Select Maths