in reply to Re^3: RegEx to remove leading zeros from a hex number
in thread RegEx to remove leading zeros from a hex number
Write a sub.
It is "not nearly as 'clever' as one might think" to write a regex one-liner. A clearly commented subroutine, that includes whatever if-statements it may need to clearly and obviously do its job, is much to be preferred.