![]() |
=~() is a String class method in Ruby which is used for matching purpose. If the given object is a Regexp, then this method will use it as a pattern to match against the given string.
Example 1:
Output: 5 Example 2:
Output: 0 6 |
Reffered: https://www.geeksforgeeks.org
Ruby |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 8 |