Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Parse inf comments in perl?

Reply
Thread Tools

Parse inf comments in perl?

 
 
Vinay
Guest
Posts: n/a
 
      05-19-2006
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

 
Reply With Quote
 
 
 
 
Dr.Ruud
Guest
Posts: n/a
 
      05-19-2006
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."


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
optparse: parse v. parse! ?? 7stud -- Ruby 3 02-20-2008 05:20 AM
Hpricot - best way to parse based on comments Jerome --- Ruby 2 11-21-2006 03:20 PM
A program to replace all JS comments with JSP comments in jsp files tungchau81@yahoo.com Java 0 06-02-2006 06:35 AM
How to parse a string like C program parse the command line string? linzhenhua1205@163.com C Programming 19 03-15-2005 07:41 PM
How to force Tomcat to reload WEB-INF/lib and WEB-INF/classes ??? Hans Java 3 05-16-2004 04:57 PM



Advertisments