Regexp group matching - extracting second group element?

From: Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr>
To: pgsql-sql(at)postgresql(dot)org
Subject: Regexp group matching - extracting second group element?
Date: 2006-01-10 14:18:47
Message-ID: 1136902727.27803.3.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

When doing group regexp matching, I can extract first group element,
using SUBSTR function, like this:

octopussy2=# select substring('wizzgame auction 24' from '\\W*(\\w*)[\
\s]+(.*)');
substring
-----------
wizzgame
(1 row)

So, i got 'wizzgame' as first group. Is there a way to extract 'auction
24' as a second group?

Mario
--
Mario Splivalo
Mob-Art
mario(dot)splivalo(at)mobart(dot)hr

"I can do it quick, I can do it cheap, I can do it well. Pick any two."

Browse pgsql-sql by date

  From Date Subject
Next Message Mauricio Fernandez A. 2006-01-11 17:55:01 Unable to identify an ordering operator '<' for type 'smallint[]'
Previous Message David Ford 2006-01-09 23:03:19 Re: system view corrupted, i get "unexpected right parenthesis" for many system tables.