Parse inf comments in perl?

V

Vinay

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
 
D

Dr.Ruud

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top