Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: regexp not ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 10602 of 11982
Post > Topic >>

Re: regexp not working past one character

by rob.dixon@[EMAIL PROTECTED] (Rob Dixon) Feb 3, 2008 at 01:16 AM

PlagueMagazine@[EMAIL PROTECTED]
 wrote:
 >
> I have a program with a line like
> 
> while (<FILE>) {
>      if (/stuff/i) {
>           print;
>      }
> }
> 
> When I run the program, and I replace "stuff" with only one character,
> like "d", it works exactly as I expect. But if instead of using "d", I
> use "da" or "date" (which I know are in FILE, because it's a text file
> I made) nothing prints on the screen. I've also tried to have it print
> to another file, and that's turned out blank too.
> 
> What am I doing wrong?

Something you aren't telling us! The code you've shown is fine and will
print all lines containing the string 'stuff' in upper or lower case.
Can you show some actual code and some data that causes this behaviour?

Rob
 




 1 Posts in Topic:
Re: regexp not working past one character
rob.dixon@[EMAIL PROTECTE  2008-02-03 01:16:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 1:43:07 CDT 2008.