Received: from gateway.indvalley.com (ptil-134-144-ban.primus-india.net [203.196.144.134] (may be forged)) by postgresql.org (8.11.3/8.11.4) with SMTP id g0F4o5V44765 for ; Mon, 14 Jan 2002 23:50:05 -0500 (EST) (envelope-from guru@indvalley.com) Received: (qmail 998 invoked from network); 15 Jan 2002 04:50:12 -0000 Received: from unknown (HELO GURU) (192.168.0.20) by 192.168.0.63 with SMTP; 15 Jan 2002 04:50:12 -0000 Date: Tue, 15 Jan 2002 10:15:40 +0530 From: Gurudutt X-Mailer: The Bat! (v1.52f) Reply-To: "Guru(External)" Organization: Indus Valley X-Priority: 3 (Normal) Message-ID: <732297387.20020115101540@indvalley.com> To: pgsql-sql@postgresql.org Subject: Re: Resources - Regular Expressions In-Reply-To: <3.0.6.32.20020111161313.007a2310@pop6.sympatico.ca> References: <3.0.6.32.20020111141809.021c4eb0@pop6.sympatico.ca> <3.0.6.32.20020111141809.021c4eb0@pop6.sympatico.ca> <3.0.6.32.20020111161313.007a2310@pop6.sympatico.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/159 X-Sequence-Number: 6245 Hi!! Thanks a lot for all the advices, I knew i could always get help from the lists. Had festival so couldn't reply earlier and we were closed. I have parallel question, I read about regular expressions being faster than the 'like', is it correct and one more thing how do u extract information from a given regular expression eg: like in perl anything inside the () can be extracted into a variable like... # Program Segment Starts here $disksize = $1 if (/Storage Swap size:\s+([-0-9\.]+)\s+MB/); # Program segment ends here as u can see the '$1' has the value of the expression thats got evaluated. Now my question is when i use the same in a SQL statement all I can get is just a boolean value whether it evaluates to true or false , nothing more than that. I would like to extract the value from the evaluated regular expression in a SQL query Is that possible? Thanks in advance... Best regards, Gurudutt mailto:guru@indvalley.com Life is not fair - get used to it. Bill Gates Saturday, January 12, 2002, 2:43:13 AM, you wrote: FB> At 03:42 PM 1/11/02 -0500, Wei Weng wrote: