[postgis-users] Select statement compare only alpha characters
davidj2k
davidj2k at yahoo.com
Thu Mar 20 07:27:52 PDT 2008
Ok, nevermind I think I figured it out I used this
lower(regexp_replace(fieldname, '[[:digit:]]*[^[:alnum:]_]*', '', 'g'))
That seems to be working but if somebody thinks that is incorrect please let
me know
davidj2k wrote:
>
> I am trying to make a select statement that compares the field to a value
> that is only alpha characters so here is the example
> This is the value in the database: $%ABC_abc-123(abc)
> This is the value that I want to use to match that value: abcabcabc
>
> I tried using regexp_replace but it did not work the way I expected.
>
> select * from table where lower(regexp(fieldname, '[\d_\W]*', '')) =
> 'abcabcabc'
>
> this regular expression works in C# but not in PostgreSQL
>
> any suggestions
>
--
View this message in context: http://www.nabble.com/Select-statement-compare-only-alpha-characters-tp16178846p16179897.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
More information about the postgis-users
mailing list