Re: Trouble with regular expressions

2009-02-07 Thread MRAB
John Machin wrote: On Feb 8, 10:15 am, MRAB wrote: John Machin wrote: On Feb 8, 1:37 am, MRAB wrote: LaundroMat wrote: Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Househ

Re: Trouble with regular expressions

2009-02-07 Thread John Machin
On Feb 8, 10:15 am, MRAB wrote: > John Machin wrote: > > On Feb 8, 1:37 am, MRAB wrote: > >> LaundroMat wrote: > >>> Hi, > >>> I'm quite new to regular expressions, and I wonder if anyone here > >>> could help me out. > >>> I'm looking to split strings that ideally look like this: "Update: New >

Re: Trouble with regular expressions

2009-02-07 Thread MRAB
John Machin wrote: On Feb 8, 1:37 am, MRAB wrote: LaundroMat wrote: Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Household)" into a group. This expression works ok: '^(Updat

Re: Trouble with regular expressions

2009-02-07 Thread John Machin
On Feb 8, 1:37 am, MRAB wrote: > LaundroMat wrote: > > Hi, > > > I'm quite new to regular expressions, and I wonder if anyone here > > could help me out. > > > I'm looking to split strings that ideally look like this: "Update: New > > item (Household)" into a group. > > This expression works ok: '

Re: Trouble with regular expressions

2009-02-07 Thread MRAB
LaundroMat wrote: Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Household)" into a group. This expression works ok: '^(Update:)?(.*)(\(.*\))$' - it returns ("Update", "New ite

Re: Trouble with regular expressions

2009-02-07 Thread John Machin
On Feb 7, 11:18 pm, LaundroMat wrote: > Hi, > > I'm quite new to regular expressions, and I wonder if anyone here > could help me out. > > I'm looking to split strings that ideally look like this: "Update: New > item (Household)" into a group. > This expression works ok: '^(Update:)?(.*)(\(.*\))$'

Trouble with regular expressions

2009-02-07 Thread LaundroMat
Hi, I'm quite new to regular expressions, and I wonder if anyone here could help me out. I'm looking to split strings that ideally look like this: "Update: New item (Household)" into a group. This expression works ok: '^(Update:)?(.*)(\(.*\))$' - it returns ("Update", "New item", "(Household)")