chandantul has asked for the wisdom of the Perl Monks concerning the following question:
Hello Smart Monks, I am trying to figure the first digit 5 of 9 digits long string by regular expression. if this 9 digits long string starts with other then 5 then the code will ignore if its starts with 5 then it will write
Please check below i was trying but its not working for me. "503009496" and i was trying below
if (exists $hash2{$celln[$o]} && $celln[$o]=~ /^[5]+$/) { $worksheet->write($r +, 0, $hash2{$celln[$o]}); $worksheet->write($r +11, 1, $celln[$o]); # print "Arrays are different\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need a regular expression to check the first digit
by GrandFather (Saint) on May 19, 2021 at 04:24 UTC | |
|
Re: Need a regular expression to check the first digit
by AnomalousMonk (Archbishop) on May 19, 2021 at 06:20 UTC | |
|
Re: Need a regular expression to check the first digit -- YAPE::Regex::Explain
by Discipulus (Canon) on May 19, 2021 at 06:53 UTC | |
by chandantul (Scribe) on May 23, 2021 at 01:51 UTC | |
|
Re: Need a regular expression to check the first digit
by davido (Cardinal) on May 19, 2021 at 14:55 UTC | |
|
Re: Need a regular expression to check the first digit
by tybalt89 (Monsignor) on May 19, 2021 at 22:50 UTC | |
|
Re: Need a regular expression to check the first digit
by Anonymous Monk on May 19, 2021 at 12:55 UTC | |
|