How to parse with regular expression...

Discussion in 'Perl Misc' started by stratus, May 5, 2005.

  1. stratus

    stratus Guest

    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 !!!
     
    stratus, May 5, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,349
  2. Roy
    Replies:
    6
    Views:
    669
    Roedy Green
    Jan 7, 2008
  3. gialloporpora
    Replies:
    4
    Views:
    731
    gialloporpora
    Jul 6, 2009
  4. Neil
    Replies:
    32
    Views:
    1,310
    Tom Anderson
    Aug 13, 2009
  5. Man-wai Chang
    Replies:
    2
    Views:
    585
    Man-wai Chang
    Mar 3, 2012
Loading...

Share This Page