string = "get all the mached groups from a string by regex";
matches = string.scan(/(\w+)/);
Monday, November 4, 2013
Get all the mached groups by regex - Ruby
There are several ways to obtain the matched groups from a string using REGEX. One of those is using the scan() function. Here is the example. In this example, its capturing all the words from the string.
This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...
Many other programming languages, Python does have the comparator facility to sort a list according to your need. You can define a customize...
Actually there is no specific variable existence like string, integer, etc at Perl. All are called Scalar, and it takes all at the same time...