--- Jean-Christian Imbeault <jc@mega-bucks.co.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
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.