Hiro Protagonist wrote:
> Hi all,
>
> I know this is, strictly speaking, off-topic. BUT, given the great
> knowledge of people responding here, I thought I'd see if someone had
> solved this problem before and can help....
>
> What I need is: a regex that shows all lines which contain 39 or less
> commas, **with anything in between those 39 commas**. I got as far as
> this:
>
> ,{38}.*,{1}
>
> but this has the disadvantage that it only picks up lines that start
> with a comma - not ones that don't. I am quite bad with regular
> expressions, so I am hoping someone can point me in the right direction.
Your regex also has the problem that '.' will match a comma. The
character set [^,] will match anything that's not a comma, so I think
you want this:
([^,]*,){,39}[^,]*
# r
--
Ronan Klyne
Business Collaborator Developer
Tel: +44 01189 028518
[EMAIL PROTECTED]
www.groupbc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]