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 17:06

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

Report this post as spam:

(Enter your email address)
[vox-tech] Regex question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] Regex question

  • Subject: [vox-tech] Regex question
  • From: "Jay Strauss" <jjstrauss@yahMAPSoo.com>
  • Date: Tue, 05 Jun 2001 04:31:23 -0700
  • References: 20010604223422.A29790@houseag.com


I'm trying to do some text mangling in perl, I have some SQL DDL and in this
DDL I'm doing searches and replaces.  the source data looks like (at least
the important bits):

INITIAL 555053
NEXT 11111

ie I have a keyword followed by N spaces/whitespace then a sting or numbers,
optionally enclosed by "", the whole thing is terminated by whitespace or

What I want to do is find expressions like described.  Save save the
beginning part and
replace the ending part.


What I'm attempting is:
starting on a word boundary, find 1 or more word characters (and save them),
ending on a
word boundary, then find any digits/alphas surrounded optionally by " (save
them) and ending on a word boundary.  Then replace the first saved part with
the first saved part, replace the second saved part with a replacement hash

But this is wrong

any help???

P.s.  Linus gave an interview on NPR


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.