"Ferruccio Zamuner" <nonsolosoft(at)diff(dot)org> writes:
> create or replace function dewey(text)
> returns text
> as '
> $_=shift;
> if (/(\d\d\d)/) {
> return "$1";
> } else {
> return("this is not a valid dewey!");
> }' language plperlu;
You need to double the backslashes.
regards, tom lane