[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-announce
Subject:    Re: mysql: Regex question
From:       Thimble Smith <tim () desert ! net>
Date:       1998-08-27 16:57:31
[Download RAW message or body]

Piet,

If those are the ONLY forms that author will be in, you can do:

[([]?([^]):,]*)

That says, skip over an optional opening [ or (, then take
as many non-punctuation characters as you can.

Tim


On Thu, Aug 27, 1998 at 03:35:21AM +0200, Piet Wesselman wrote:
> In my books database I have a field 'author', the contents of which can take \
> different forms like: 
> HEMINGWAY, ERNEST
> WOOLF:
> (MELVILLE) JONES, JOE
> [GRISHAM] JONES, JOE
> 
> I want to extract from that field the author's last name (or the name in \
> parentheses) to place that in a separate field. Is there a regex expression that \
> can do this? (You guessed it: I am a bookseller, not a regex expert!)
> 
> Thanks in advance,
> 
> Piet Wesselman
-----------------------------------------------------------
Send a mail to mdomo@tcx.se with
unsubscribe mysql your@subscription.address
in the body of the message to unsubscribe from this list.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic