| | |
| | |
| | |
| | Enter the string that you want to use a regular expression on: |
|
| | Select the elements that you want to extract to run regular expression generator: |
2 | | What to click? | extract any integer in this position |  | extract this integer (2006) in this position |
| |
|
| |
3 | | Perl regular expression program that extracts the selected elements from the entered string: |
| | | | |
#!/usr/bin/perl
$txt='42 43';
$re1='(4)';
$re2='.*?';
$re3='( )';
$re4='.*?';
$re5='(3)';
$re=$re1.$re2.$re3.$re4.$re5;
if ($txt =~ m/$re/is)
{
$c1=$1;
$ws1=$2;
$day1=$3;
print "($c1) ($ws1) ($day1) \n";
}
| | |
|
|
  |