Regex matching a #

G

Gharial

This sounds like a very simple problem but I cannot get a match for a
line beginning with a "#" (a comment line). I tried backslashing the
"#", also tried putting in the hex and octal values in the m// but no
success. Perhaps someone out there can help.
 
G

Gunnar Hjalmarsson

Gharial said:
This sounds like a very simple problem but I cannot get a match for
a line beginning with a "#" (a comment line). I tried backslashing
the "#", also tried putting in the hex and octal values in the m//
but no success. Perhaps someone out there can help.

I don't see your code.
 
J

Joe Smith

Gharial said:
This sounds like a very simple problem but I cannot get a match for a
line beginning with a "#" (a comment line). I tried backslashing the
"#", also tried putting in the hex and octal values in the m// but no
success. Perhaps someone out there can help.

It's trivial to match a poundsign at the beginning of the line.
Show us what you've tried so far.
Post your response to comp.lang.perl.misc, not here (comp.lang.perl).
-Joe
 
N

nobull

This sounds like a very simple problem but I cannot get a match for a
line beginning with a "#" (a comment line). I tried backslashing the
"#", also tried putting in the hex and octal values in the m// but no
success.

There should be no problem.
Perhaps someone out there can help.

Not without seeing your real problem.

Please post a _mimimal_ but _complete_ program that illustrates the
problem you are having.

Note the above advice can be found in the posting guidelines that are
frequently posted to the newsgroup that superceded this one when this
one ceased to exist many years ago (see FAQ).

You may want to write to Google to ask them to put a warning when you
post to a non-existant group. I've already done so. If enough people
do so then they may actually think there's a real need.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top