regular expression searches

Поиск
Список
Период
Сортировка
Искать
От
David Bitner
Тема
regular expression searches
Дата
Msg-id
JLEBJEFBOADDHAIFJNPEEELJCCAA.bitner@macnoise.com
Список
Дерево обсуждения
regular expression searches "David Bitner" <bitner@macnoise.com>
Re: regular expression searches David Fetter <david@fetter.org>
Question from a newbie "Kiarash Bodouhi" <kbodouhi@yahoo.com>
Re: Question from a newbie Tom Lane <tgl@sss.pgh.pa.us>
Re: Question from a newbie Michael Fuhr <mike@fuhr.org>
I am trying to create a PL/PGSQL function that can parse a street address
into the component parts (i.e. "200 W 54th Street" into num->200 dir->W
street->54th type->ST).

What I would like is to be able to use regular expressions within PL/PGSQL
to accomplish this using mapping tables for the different components.

For example, I would have a table with all the different acceptible road
types:
Abbreviation 	| 	Regex
__________________________________
RD			|	R(OA)?D
AV			|	AVE?(NUE)?
ST			| 	STR?(EET)?

and replace everything that matches the regex with the abbreviation while
saving the road type as a variable.

Any help would be appreciated.

Thanks,
David



В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Kris Jurka
Дата:
FAQ