Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Correct Regex for reading stock symbol?

by kwaping (Priest)
on Jan 31, 2006 at 17:39 UTC ( [id://526815]=note: print w/replies, xml ) Need Help??


in reply to Correct Regex for reading stock symbol?

Removed: I learn something new every day on this site! Thanks to samtregar for today's lesson.

I thought it had something to do with the unescaped period inside the brackets in the regex, but samtregar proved me wrong.
  • Comment on Re: Correct Regex for reading stock symbol?

Replies are listed 'Best First'.
Re^2: Correct Regex for reading stock symbol?
by samtregar (Abbot) on Jan 31, 2006 at 17:47 UTC
    Not true. Observe:

    $ perl -e 'print "broken\n" if "foo" =~ /[.]/' $ perl -e 'print "ok\n" if "foo." =~ /[.]/' ok

    The period is not magical inside a character class.

    -sam

Re^2: Correct Regex for reading stock symbol?
by dimar (Curate) on Jan 31, 2006 at 20:18 UTC
    Removed: I learn something new every day on this site!

    Unfortunately, nobody else gets to, because you removed the node instead of updating it. Please consider that next time, so others can get the full context of the thread and benefit in the mutual learning opportunity.


    =oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://526815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-26 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found