Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Numerical or String

Expand Messages
  • Marcos Onisto
    Hello Shawn, I appreciate you help. Thanks a lot. regards, Marcos Shawn Milochik wrote: On Oct 10, 2006, at 10:33 AM, Marcos Onisto
    Message 1 of 13 , Oct 16, 2006
      Hello Shawn,

      I appreciate you help. Thanks a lot.

      regards,

      Marcos


      Shawn Milochik <shawn@...> wrote:
      On Oct 10, 2006, at 10:33 AM, Marcos Onisto wrote:

      <trim>

      >
      > I confess that regexp is yet dificult to me.
      >
      > Thanks a lot,
      >
      > Marcos Luiz Onisto
      <trimmed>

      Marcos,

      I highly recommend "Mastering Regular Expressions" by Jeffrey Friedl.
      In my opinion, it's the easiest (and most fun) way to learn regular
      expressions. The third edition was just released. I read the second
      edition, and it's great.

      Don't be scared off by things like this: /^\d+$/

      Just to show you how easy this can be, read along with me.

      ^ (means the beginning of a line)
      \d (means digits, 0 through 9)
      + (means one or more of whatever it comes after, in this case, digits)
      $ (means "end of line")

      So all /^\d+$/ means is "Match if the line contains one or more
      digits, and nothing else."
      Or, more literally, "Match the beginning of the line, followed by one
      or more digits, followed by the end of the line."

      It will not match input if there is a newline character or there are
      blank spaces in the variable. You'd have to tweak the regex to do that.

      Hope this helps.

      Shawn





      ---------------------------------
      All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.