Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Regex matching a #

Reply
Thread Tools

Regex matching a #

 
 
Gharial
Guest
Posts: n/a
 
      09-08-2004
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.
 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      09-08-2004
Gharial wrote:
> 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.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      09-08-2004
Gharial wrote:

> 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
 
Reply With Quote
 
nobull@mail.com
Guest
Posts: n/a
 
      09-08-2004
(Gharial) wrote in message news:< om>...
> 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.
 
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
Regex testing and UTF8 awarenes or Regex and numeric pattern matching sln@netherlands.com Perl Misc 2 03-10-2009 03:51 AM
How make regex that means "contains regex#1 but NOT regex#2" ?? seberino@spawar.navy.mil Python 3 07-01-2008 03:06 PM
String Pattern Matching: regex and Python regex documentation Xah Lee Python 8 09-26-2006 03:24 PM
String Pattern Matching: regex and Python regex documentation Xah Lee Perl Misc 2 09-25-2006 03:15 AM
String Pattern Matching: regex and Python regex documentation Xah Lee Java 1 09-22-2006 07:11 PM



Advertisments