in reply to Re^4: compare individual string with complete array
in thread compare individual string with complete array
Hello rohan_532,
I am sorry but I am not able to understand what you mean.
I will try guess your way of thinking and you can verify or falsify or correct me if this is what you are looking for.
Based on your answer Example:- The description variable value is the one to compare in array., let's create a scenario with sample data something that YOU should have done so we will be able to replicate the problem.
#!usr/bin/perl use strict; use warnings; # Variables that I will extract from the escel sheet my @steps_name = ("1-2 Steps", "5-7 Steps", "8-10 Steps", "11-15 Steps +"); #regex that I want to match against foreach (@steps_name) { print "Matched with ".$_."\n" if /(?:\b8-10 Steps\b|\b11-15 St +eps\b)/; } __END__ $ perl test.pl Matched with 8-10 Steps Matched with 11-15 Steps
You can combine regular expression if, if this is what you are looking for. Provide us a sample of expected input and desired matched output. It does not have to be compiling code, produce a pseudo code.
Update: Apologies if I sounded a bit harsh but we need to know what exactly you are looking for, so we can help you as soon as possible. If your question is still not answered please provide us more information.
Hope this helps.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: compare individual string with complete array
by rohan_532 (Initiate) on Jun 01, 2017 at 03:34 UTC | |
by AnomalousMonk (Archbishop) on Jun 01, 2017 at 06:47 UTC | |
by thanos1983 (Parson) on Jun 01, 2017 at 08:14 UTC | |
by rohan_532 (Initiate) on Jun 02, 2017 at 04:50 UTC |