Received: from web20803.mail.yahoo.com (web20803.mail.yahoo.com [216.136.226.192]) by postgresql.org (8.11.3/8.11.4) with SMTP id g0HFD6V06051 for ; Thu, 17 Jan 2002 10:13:07 -0500 (EST) (envelope-from jeff_eckermann@yahoo.com) Message-ID: <20020117151310.82324.qmail@web20803.mail.yahoo.com> Received: from [65.11.165.34] by web20803.mail.yahoo.com via HTTP; Thu, 17 Jan 2002 07:13:10 PST Date: Thu, 17 Jan 2002 07:13:10 -0800 (PST) From: Jeff Eckermann Subject: Re: Pattern Matching on Columns To: Bhuvan A , pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200201/199 X-Sequence-Number: 6285 If I understand you right: 1. You have a column which contains blocks of text, which may be multi-line. 2. You want to find out how many of those lines match a given pattern? Or you just want to extract those lines? A function using pl/perl looks like your best bet. Perl regular expressions could do what you want quite easily. --- Bhuvan A wrote: > > Thu Jan 17 10:26:49 IST 2002 > ---------------------------- > > Hello, > > How can i apply a delimiter, in pattern matching on > database columns? > > say, in my table i have a column of type 'text' and > each of its value > is MULTIPLE lines. > > Now, i would like to search for a string in (say > delimiter is '\n') > that column and it should result in that many > MATCHED LINES instead of > that many matched columns. > > How can i achieve this? Thankx in advance. > > NOTE: Kindly apologize for any inconvenience. > > > ====================================================================== > I like work; it fascinates me; I can sit and look > at it for hours. > ====================================================================== > > Regards, > Bhuvaneswar. > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the > unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/