@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
@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
Jeffrey B. wrote:
@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)))
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs