Parse inf comments in perl?

Discussion in 'Perl Misc' started by Vinay, May 19, 2006.

  1. Vinay

    Vinay Guest

    Hi Guys, I am a new Member to this group. I hope I can contribute as
    well as gain information to use Perl in a better way.
    My first query here is I have a project to parse and remove comments in
    a text file. The comments are described as:
    Any characters following a semicolon on the same line, unless the
    semicolon appears within a "quoted string"
    Is there a s/// regular expression possible to do the same for me or
    would I need to parse the string explicitly? What would be the best way
    to parse it in case I have to do it that way. Any helpfull pointers
    would be appreciated :)
    Thanks in advance,
    Vinay
     
    Vinay, May 19, 2006
    #1
    1. Advertising

  2. Vinay

    Dr.Ruud Guest

    Vinay schreef:

    > My first query here is I have a project to parse and remove comments
    > in a text file. The comments are described as:
    > Any characters following a semicolon on the same line, unless the
    > semicolon appears within a "quoted string"


    Read the Posting Guidelines.
    Create a script.
    If the script doesn't do what you want it to do, make a minimal script
    that has the problem, and come back here.

    --
    Affijn, Ruud

    "Gewoon is een tijger."
     
    Dr.Ruud, May 19, 2006
    #2
    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. Hans
    Replies:
    3
    Views:
    2,501
    Ryan Stewart
    May 16, 2004
  2. Replies:
    0
    Views:
    1,138
  3. Monk
    Replies:
    10
    Views:
    1,479
    Michael Wojcik
    Apr 20, 2005
  4. Jerome ---
    Replies:
    2
    Views:
    180
    Ken Bloom
    Nov 21, 2006
  5. Replies:
    4
    Views:
    615
    Dr John Stockton
    Jun 3, 2006
Loading...

Share This Page