string search

J

Jeffrey Bowen

@speed += 1 if sp.slice(8..13) == "03X16"

I've pulled bits 8 though 13 from my string and want
to see if it equal 03X16 where X is number 0-9.
Something like "grep -c 03.16 temp" would work. I've
tried \d of course this did not work.

Thanks
Jeff




____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
 
T

Tim Hunter

Jeffrey said:
@speed += 1 if sp.slice(8..13) == "03X16"

I've pulled bits 8 though 13 from my string and want
to see if it equal 03X16 where X is number 0-9.
Something like "grep -c 03.16 temp" would work. I've
tried \d of course this did not work.

@speed += 1 if (/03\d16/.match(sp.splice(8..13)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,310
Members
47,979
Latest member
konoha

Latest Threads

Top