Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regarding Regular Expressions

Status
Not open for further replies.

Perl4learners

Programmer
Joined
Apr 24, 2007
Messages
1
Location
US
Hi, i am very new to perl, i want to know wat does the following regular expression means,,
$area =~ m!main/(.*)/WORKAREA/!;

thanks


 
it means $area matches a pattern:

main/(zero or more of anything here)/WORKAREA





------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
I forgot to include that the part of the pattern that matches (.*) is stored in pattern memory in a variable you can access: $1 (dollar sign and a one).

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top