Results 1 to 2 of 2
Hi,
I have below code in perl :
Code:
my($abc) = "fred<hello>3hello";
$abc =~ /^[^\d]{2,4}<([^>]+)>\d?
$/;
if (defined($1)) {
print "$1\n";
} else {
print "not found\n";
}
}
What is ...
- 02-10-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 1
what does below code do ??
Hi,
I have below code in perl :
What is the code doing ?? what function of the regular expressionCode:my($abc) = "fred<hello>3hello"; $abc =~ /^[^\d]{2,4}<([^>]+)>\d?\1$/; if (defined($1)) { print "$1\n"; } else { print "not found\n"; } }
$abc =~ /^[^\d]{2,4}<([^>]+)>\d?\1$/;
??
- 02-11-2011 #2
This sounds like a homework question. Homework questions are not allowed as per the forum rules:
http://www.linuxforums.org/forum/lin...ums-rules.html
You can look this up for yourself by Googling for information on regular expressions in general, and Perl regular expressions in particular.DISTRO=Arch
Registered Linux User #388732


