ImJustAFriend has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks. I am having issues with my regex that is driving me NUTS!! Here's the scenario:
I have the following data assigned to variable $BE_temp:
I need to extract the two "dsmgt*" pieces into 2 different variables. I have tried a multitude of methods, but none are working. The latest attempt:+--------------+-------------+ | version_name | schema_name | +--------------+-------------+ | dsmgt_03_03 | dsmgt_03 | +--------------+-------------+
$BE_temp =~ m/^\|\s(\w+_\d+)\s+\|\s+(\w+)\s+\|$/m; my $LSV = $1; my $LSN = $2;
Any thoughts on what I've got wrong? I'm the first to admit that RE is not my strong suit...
Thank you in advance for the assistance!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Issues With Regex
by choroba (Cardinal) on Jan 07, 2014 at 22:41 UTC | |
|
Re: Issues With Regex
by AnomalousMonk (Archbishop) on Jan 08, 2014 at 00:38 UTC | |
|
Re: Issues With Regex
by ImJustAFriend (Scribe) on Jan 08, 2014 at 17:20 UTC | |
by AnomalousMonk (Archbishop) on Jan 08, 2014 at 17:46 UTC | |
|
Re: Issues With Regex
by ImJustAFriend (Scribe) on Jan 08, 2014 at 13:42 UTC | |
by AnomalousMonk (Archbishop) on Jan 08, 2014 at 17:37 UTC | |
by GotToBTru (Prior) on Jan 08, 2014 at 16:21 UTC |