Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If I have two variables, I wish to compare one to the other, the problem is that the fist variable will contain value "1.1.2" the second will be "1.1"
How do I test for a match within the first two digits? The first variable can be quite long, like 1.1.2.1 etc, but I only want to check that the first two digits are the same as the second variable, regardless of how many digits the first variable has.
thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex question
by Skeeve (Parson) on May 22, 2007 at 09:42 UTC | |
by CountZero (Bishop) on May 22, 2007 at 13:14 UTC | |
|
Re: Regex question
by BrowserUk (Patriarch) on May 22, 2007 at 09:57 UTC | |
by Skeeve (Parson) on May 22, 2007 at 12:44 UTC | |
by BrowserUk (Patriarch) on May 22, 2007 at 13:42 UTC | |
by Skeeve (Parson) on May 22, 2007 at 22:47 UTC | |
|
Re: Regex question
by fenLisesi (Priest) on May 22, 2007 at 13:15 UTC | |
|
Re: Regex question
by robot_tourist (Hermit) on May 22, 2007 at 09:58 UTC | |
|
Re: Regex question
by chrism01 (Friar) on May 23, 2007 at 06:15 UTC |