in reply to I'm not good at regex's
in thread Probably silly regex question / not so silly regex question

gryng wrote:

I'm not very good at regex's theorbtwo, so instead of saying
something vague and probably wrong, I'm just going to offer up real
quick the regex I'd use (and hope it works):

/(.*)\.([^\.]+)/

The funny thing is, I just learned this afternoon that you don't need to escape the dot in a character class: so the above is wrong. Assuming that you meant (obviously you did) what you typed. dot is just dot inside the brackets. (Camel 2cd Ed page 71, in the middle of the code in the page).

Intrepid

Replies are listed 'Best First'.
Sold my Camels
by gryng (Hermit) on Aug 02, 2000 at 07:18 UTC
    I sold my Camels to afford thinkgeek.com's perl book set, and then it went to back order :( . So I'm Camel-less and can't use your nifty reference :( :( . However I do believe you, but I think my code still works it's just I didn't need to escape when I did. Thank you though :) .... :( but I'm still sad about my missing Camels :(

    Gnight,
    Gryn

      I am sorry to hear about your Camel(s) too. That's quite dedicated, to
      sell your books to afford other books. And yes, I think you are
      right, your code still works. Perl can be very forgiving ..
      sometimes. Wish Life itself was always that way.