--- Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
wrote:
> Is there a simple way to get psql to return the part
> that match a query
> containing a regexp?
>
CREATE FUNCTION str_capture(text, text) RETURNS text
AS '
$_[0] =~ m/($_[1])/;
return $1;
' LANGUAGE 'plperl';
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com