Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

RE: RE: (2) One for the regexp fans (nnnn:nnnn:nnnn)

by nuance (Hermit)
on Aug 04, 2000 at 17:19 UTC ( #26183=note: print w/replies, xml ) Need Help??


in reply to RE: (2) One for the regexp fans (nnnn:nnnn:nnnn)
in thread One for the regexp fans

You could probably do something like:
if $str =~ m!\.! {$str =~ s/(\.?[0-9a-eA-E]*)/(substr("0$1", -2))/ge;} else {$str =~ s/(:?[0-9a-eA-E]*)/(substr("0$1", -4))/ge;}

Nuance

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://26183]
help
Chatterbox?
[SuicideJunkie]: Parse a serial number from a register. But it is humans that type it in originally.
[SuicideJunkie]: No respect for buffer sizes... give them a byte, they take three :D

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2016-12-07 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.