Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Regex for matching dotted numbers

by techman2006 (Beadle)
on Jul 21, 2014 at 16:33 UTC ( [id://1094529]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex for matching dotted numbers
in thread Regex for matching dotted numbers

I have done on similar line as the pattern was not consistent as I was thinking.

  • Comment on Re^2: Regex for matching dotted numbers

Replies are listed 'Best First'.
Re^3: Regex for matching dotted numbers
by jellisii2 (Hermit) on Jul 21, 2014 at 18:31 UTC
    Your supplied test data doesn't suggest this. If it's not 3 or 4 numbers separated by a dot, what is it? If it is separated by a dot, you can check scalar(@ver) to see if it's 3 or 4 numbers, and check $ver[0] to get your major number, and continue from there. You could even use one of the many switch analogs from CPAN to implement switch statements on the version numbers.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1094529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found