G
Geometric Patterns
Hi, I have a very simple regex question.
I don't understand why the regex in the example below isn't identifying
that the string is longer than 12 characters long...
=> nil
Any ideas?
Many thanks in advance!
I don't understand why the regex in the example below isn't identifying
that the string is longer than 12 characters long...
goodline = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
if line =~ /[a-zA-Z]{2,12}/
puts "good"
else ?> puts "bad"
end
=> nil
Any ideas?
Many thanks in advance!