Match Perl, zero or more spaces, and Python : Regexps « Development « Ruby

Match Perl, zero or more spaces, and Python

  /Perl *Python/       # Perl, zero or more spaces, and Python


Related examples in the same category

1.Regexps use elements to instruct the regular expression engine on how to find a given string.
2.An example of a regular expression used to match a string with the String method scan.
3.Search for a word from the very beginning
4.Looking for a word
9.grep(/^When in/)
10.grep(/outcast state,$/)
11.grep(/\Aen in/)
12.grep(/e n,\z/)
17.Implementing Class and Singleton Methods
18.Match a time
19.Match Perl, zero or more other chars, then Python
20.Match Perl, a space, and Python
21.Match Perl, one or more spaces, and Python
22.Match Perl, whitespace characters, then Python
23.Match Ruby, a space, and either Perl or Python
24.Match a regular repression in if statement
25.sub and gsub replace with regular expressions
26.Replace Perl or Python with Ruby
27.The method Regexp#match matches a regular expression against a string.
28.MatchData-related $-variables are in $~