J
Jeremy Woertink
K, so I suck at regular expressions. I just don't seem to understand
them.
What I want to do is determine if a string includes 2 special characters
a semi-colon and a question mark.
Here's my example that I'm trying to work with.
irb(main):009:0> encoding = ";6277200301500269=?"
=> ";6277200301500269=?"
irb(main):010:0> encoding.include?(%r{;\?}.to_s)
=> false
irb(main):011:0>
I want this to return true, but it doesn't
Can anyone help me out?
thanks,
~Jeremy
them.
What I want to do is determine if a string includes 2 special characters
a semi-colon and a question mark.
Here's my example that I'm trying to work with.
irb(main):009:0> encoding = ";6277200301500269=?"
=> ";6277200301500269=?"
irb(main):010:0> encoding.include?(%r{;\?}.to_s)
=> false
irb(main):011:0>
I want this to return true, but it doesn't
Can anyone help me out?
thanks,
~Jeremy