FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-15-2008, 08:44 PM
Hugo Vanwoerkom
 
Default regexp q.

Hi,


Not being very versatile in regular expressions I wonder if is possible
to express this:


Find the number of ),( triplets in a string, provided they are not in a
substring that is enclosed in single quotes, ignoring the pair ' in all
cases.


in a regular expression?

Hugo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-15-2008, 10:46 PM
Allan Wind
 
Default regexp q.

On 2008-07-15T15:44:02-0500, Hugo Vanwoerkom wrote:
> Find the number of ),( triplets in a string, provided they are not in a
> substring that is enclosed in single quotes, ignoring the pair ' in all
> cases.
>
> in a regular expression?

Sounds like home work.

You cannot use regex for counting, so you have add something else
(either code, or another program if you use something like egrep).


/Allan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-17-2008, 08:28 PM
Andrew Sackville-West
 
Default regexp q.

On Thu, Jul 17, 2008 at 09:22:53AM -0700, Bob McGowan wrote:

...
> Besides, Andrew's eyes need time to heal

no hope of that. I just need to finally bite the bullet and grok some
more regex. The only issue with Florian's now snipped line is that its
so daunting I don't know where to start. And I can't pass up the
opportunity to get modded funny! oh.. wait.

A
 

Thread Tools




All times are GMT. The time now is 01:11 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org