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. Advertisements

  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. Advertisements

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. Paul Johnson

    Representing INF in a real?

    Paul Johnson, Jan 27, 2006, in forum: VHDL
    Replies:
    6
    Views:
    2,073
  2. Hans
    Replies:
    3
    Views:
    3,109
    Ryan Stewart
    May 16, 2004
  3. Replies:
    0
    Views:
    1,316
  4. Replies:
    19
    Views:
    1,400
    Daniel Vallstrom
    Mar 15, 2005
  5. Monk
    Replies:
    10
    Views:
    1,766
    Michael Wojcik
    Apr 20, 2005
  6. Jerome ---
    Replies:
    2
    Views:
    275
    Ken Bloom
    Nov 21, 2006
  7. 7stud --

    optparse: parse v. parse! ??

    7stud --, Feb 20, 2008, in forum: Ruby
    Replies:
    3
    Views:
    346
    7stud --
    Feb 20, 2008
  8. Replies:
    4
    Views:
    812
    Dr John Stockton
    Jun 3, 2006
Loading...