From: John W Higgins Date: 2013-02-05T01:00:27+09:00 Subject: Re: Character classes use in Ruby --f46d04462f0edcb9a304d4e8301d Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 4, 2013 at 7:46 AM, Love U Ruby wrote: > tamouse mailing lists wrote in post #1095109: > > On Mon, Feb 4, 2013 at 4:59 AM, Love U Ruby > > wrote: > >>> /[[:digit:]]/ - Digit > >> > >> I know their description - but would be good for me if I get a ruby tiny > >> code to see their uses. Mainly how syntactically are they > >> used,basically. > > > > Read the page Hans pointed you to: > > > > /[[:upper:]][[:lower:]]/.match("Hello") #=> # > > > Okay! Could you explain how the matching here performed, to produce > "#" > > Could you at least at some point take 10 seconds and try to figure anything out on your own? 99.9% of the fun of development is the excitement of figuring something out. If all you are going to do every day is just accomplish nothing then why bother with this path in life? What possibly do you believe would produce that result? What about trying with "hEllo" or "HELLO" or "hello" and see what comes back and see what you can deduce from that. Then move on to something like "HeLlO" and see how it works and what you can do to get multiple results and how to handle multiple results. You are missing so much of the enjoyment of the language by sitting there and accomplishing absolutely nothing on your own. --f46d04462f0edcb9a304d4e8301d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, Feb 4, 2013 at 7:46 AM, Love U R= uby <lists@ruby-forum.com> wrot= e:
tamouse mailing lists wrote in post #1095109:
> On Mon, Feb 4, 2013 at 4:59 AM, Love U Ruby <lists@ruby-fo= rum.com>
> wrote:
>>> /[[:digit:]]/ - Digit
>>
>> I know their description - but would be good for me if I get a rub= y tiny
>> code to see their uses. Mainly how syntactically are they
>> used,basically.
>
> Read the page Hans pointed you to:
>
> /[[:upper:]][[:lower:]]/.match("Hello") #=3D> #<MatchD= ata "He">


Okay! Could you explain how the matching here performed, to produce "#<MatchData "He">"


Could you at least at some point take 10 seconds and try to= figure anything out on your own? 99.9% of the fun of development is the ex= citement of figuring something out. If all you are going to do every day is= just accomplish nothing then why bother with this path in life?

What possibly do you believe would produce that result? What about tryi= ng with "hEllo" or "HELLO" or "hello" and see= what comes back and see what you can deduce from that. Then move on to som= ething like "HeLlO" and see how it works and what you can do to g= et multiple results and how to handle multiple results.

You are missing so much of the enjoyment of the language by sitting the= re and accomplishing absolutely nothing on your own.
--f46d04462f0edcb9a304d4e8301d--