Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to parse ....

0 views
Skip to first unread message

stratus

unread,
May 4, 2005, 6:48:01 AM5/4/05
to
I have a command like the following :
-begin [xxxxxx] -through [xxxxx \
xxxxxx\
xxxxx \
] -end [xxxxx \
xxxxx\
]

And I want to add some contents before and after the bracket [] if
has the keyword "begin" "end"

Like -begin +++++++[xxxxxxx]++++++ -through [xxxxx \
xxxxxx\
xxxxx \
] -end +++++++[xxxxx \
xxxxx\
]+++++

How to do this ?

Gunnar Hjalmarsson

unread,
May 4, 2005, 7:04:41 AM5/4/05
to

Use the s/// operator.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

stratus

unread,
May 4, 2005, 9:36:42 PM5/4/05
to
I have a command like the following in multiple line with "\" operator:
-begin [yyy[xxx{xx}x]zz] -through [xxxxx \
xxxxxx\
xxxxx \
] -end [xxxxx [yy zz] {ww} \
xxxxx\
]

And I want to add some contents before and after the bracket [] if
has the keyword "begin" "end"

Hence, the results should look like
-begin +++++[yyy[xxx{xx}x]zz]+++++ -through [xxxxx \
xxxxxx\
xxxxx \
] -end +++[xxxxx [yy zz] {ww} \
xxxxx\
]+++


How to do this with the regular expression...
Thanks !!!


Tad McClellan

unread,
May 4, 2005, 10:48:15 PM5/4/05
to
stratus <gis8...@cissol1.cis.nctu.edu.tw> wrote:

> I have a command like the following in multiple line with "\" operator:


Please stop posting the same thing multiple times!


--
Tad McClellan SGML consulting
ta...@augustmail.com Perl programming
Fort Worth, Texas

Chris Mattern

unread,
May 4, 2005, 11:39:34 PM5/4/05
to
stratus wrote:

<snip>

I have this strangest feeling of deja vu...

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"

0 new messages