How to parse with regular expression...

S

stratus

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 !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top