Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have a doubt on how to do a regex match only with alphanumeric. I am putting a scenario here pls help.
$data_main = "The ideal Rack cleaning support candidate is dedicated t +o providing outstanding customer service every day. New Store Opening Promenade in Crocker Park Rack Nordstrom Rack is a division of Nordstrom, a fashion specialty retaile +r founded on a simple idea: offer customers the best possible service +, quality, value and selection. We are looking for motivated people t +o provide cleaning services to maintain a pleasant shopping environme +nt for our customers. Nordstrom Rack is where customers go for top-of-the-line Nordstrom fas +hion and accessories at fabulous values. When you work for Nordstrom +Rack, you'll enjoy flexible hours, a friendly atmosphere and competit +ive pay and benefits. You'll also be a part of a team that is committ +ed to supporting your career goals. We are always looking for exceptional people who share our love for th +e customers we serve, the merchandise we sell and the work we do!"; $out = $1 if ($data_main =~ /(NewStoreOpeningPromenadeinCrockerParkRac +kNordstromRackisadivisionofNordstrom.*)/is); print $out; exit; Desired Output -------------- New Store Opening Promenade in Crocker Park Rack Nordstrom Rack is a division of Nordstrom, a fashion specialty retaile +r founded on a simple idea: offer customers the best possible service +, quality, value and selection. We are looking for motivated people t +o provide cleaning services to maintain a pleasant shopping environme +nt for our customers. Nordstrom Rack is where customers go for top-of-the-line Nordstrom fas +hion and accessories at fabulous values. When you work for Nordstrom +Rack, you'll enjoy flexible hours, a friendly atmosphere and competit +ive pay and benefits. You'll also be a part of a team that is committ +ed to supporting your career goals. We are always looking for exceptional people who share our love for th +e customers we serve, the merchandise we sell and the work we do!
Basically, I only want to include the alphanumeric only to do the matching process, NO SPACES, NO NEW LINES etc.. How can I achieve it?
Thanks for your time.
|
|---|