How to parse ....

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

  2. stratus <> 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
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, May 5, 2005
    #2
    1. Advertising

  3. 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?"
     
    Chris Mattern, May 5, 2005
    #3
    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. Mitchua
    Replies:
    3
    Views:
    1,200
    Mitchua
    Jul 14, 2003
  2. Raj Mudaliar
    Replies:
    0
    Views:
    2,312
    Raj Mudaliar
    Jul 14, 2003
  3. John M. Lembo

    Parse Text File and Output to File

    John M. Lembo, Aug 1, 2003, in forum: Perl
    Replies:
    0
    Views:
    12,757
    John M. Lembo
    Aug 1, 2003
  4. Replies:
    19
    Views:
    1,184
    Daniel Vallstrom
    Mar 15, 2005
  5. 7stud --

    optparse: parse v. parse! ??

    7stud --, Feb 20, 2008, in forum: Ruby
    Replies:
    3
    Views:
    212
    7stud --
    Feb 20, 2008
Loading...

Share This Page