We all are aware of the pattren matching operator =~
1
|
|
But what about !=~?
we don't get any errors, but boolean true value
1 2 3 4 5 6 |
|
So the right way :
1 2 3 |
|
Another simple way is to use the match
method ! hemanth.match("foo") #=> true
We all are aware of the pattren matching operator =~
1
|
|
But what about !=~?
we don't get any errors, but boolean true value
1 2 3 4 5 6 |
|
So the right way :
1 2 3 |
|
Another simple way is to use the match
method ! hemanth.match("foo") #=> true