in reply to Re^3: Perl Regex Match (Compare Only AlphaNumeric)
in thread Perl Regex Match (Compare Only AlphaNumeric)

Hi Hdb, I tried something like this, but not working. Is there any way to define that string seperately as I done here.
$qqq = "New Store Opening Promenade in Crocker Park Rack Nordstrom Rac +k is a division of Nordstrom"; my $regex = join '\s+', qw($qqq); $out = $1 if ($data_main =~ /($regex.*)/is);

Its the same code except that string is defined separately. Will this not work? or is there another way to define that string seperately... Actually I want a global solution for this. I have may files similar which need to be done. thats why I need a global solution & not a hardcoded solution. Thanks

Replies are listed 'Best First'.
Re^5: Perl Regex Match (Compare Only AlphaNumeric)
by choroba (Cardinal) on Aug 23, 2013 at 12:30 UTC
      Thanks Choroba, Is there any alternate for that to get it done?
Re^5: Perl Regex Match (Compare Only AlphaNumeric)
by tobyink (Canon) on Aug 23, 2013 at 13:28 UTC
    my $regex = join '\s+', split /\s+/, $qqq;
    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name"