method
match
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
match(regexp)
public
Register or
log in
to add new notes.
emime -
April 22, 2011
emime -
April 24, 2011
![Default_avatar_30](https://www.gravatar.com/avatar/dc0c13189cad0b78bcc4e441329ea03d?default=http://apidock.com/images/default_avatar_30.png&size=30)
0 thanks
![Default_avatar_30](https://www.gravatar.com/avatar/dc0c13189cad0b78bcc4e441329ea03d?default=http://apidock.com/images/default_avatar_30.png&size=30)
0 thanks
Input strings are treated as regexp
Input strings are treated as regexp, but you can escape special regexp characters as usual:
"*test*".should match "\\*test\\*" #=> pass "*test*".should match '\*test\*' #=> pass "*test*".should match /\*test\*/ #=> pass