l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 16:49

The following is an archive of a post made to our 'vox mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox] Help with Regular Expression?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox] Help with Regular Expression?

It is indeed for a Perl script that I'm working on.  I'm not a Perl 
programmer by any stretch of the imagination but I can hammer things out 
when I have to.  If Perl is the duct tape of the Internet, then I'm the guy 
who uses up a whole roll to fix a single leaky joint.

At any rate, Henry's regexp worked perfectly!  I did have to replace $1 
with $2 in the replacement string, but I am indeed indebted to those who 
helped out.

And next time I'll be sure to send this sort of question to vox-tech.  ;)

At 01:49 PM 9/28/2001, you wrote:
>This is going to vary a lot depending on the tool used and what you define 
>to be a string.
>Here's an example that's really ugly but works with under Red Hat 
>7.1.  But I think
>learning Perl is going to be your best bet for things like this.
>cat myfile | sed -e 's/\(^\| \)\([^A ]\)/\1A\2/g' | sed -e 's/\([^A ]\)\( 
>-- Rod

Richard S. Crawford

AIM: Buffalo2K
"It is only with the heart that we see rightly; what is essential is 
invisible to the eye."  --Antoine de Saint Exupéry

"Push the button, Max!"

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.