Substring RegExp Extract path - Mailing list pgsql-general

From nicholas.wakefield@gmail.com (Nick)
Subject Substring RegExp Extract path
Date
Msg-id b065e608.0408241902.512449e9@posting.google.com
Whole thread Raw
Responses Re: Substring RegExp Extract path  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Hi,

I'm trying to extract element of a directory path stored in the db with substring

"/help/support/index/time.jsp"

and i want to extract the 1st, 2nd and 3rd parts

1st = help, 2nd = support, 3rd = index

but I can't get the regular expressions correct.

Any ideas on what I need to do.

select substring(data,'????') from paths

TIA

pgsql-general by date:

Previous
From: pablo_tweek@yahoo.com (Pablo S)
Date:
Subject: Possible to insert quoted null value into integer field?
Next
From: Greg Stark
Date:
Subject: Re: Aggregate query for multiple records