[Tutor] Question on regular expressions (fwd)
Alan Gauld
alan.gauld at freenet.co.uk
Thu May 25 06:19:58 CEST 2006
> Your code put me right on track.
>
> - From that point, I crafted the following code.
>
> What is confusing is how to take the captured character and
> transform it
> into a 3 digit hex value.
In general I prefer to use string formatting to convert into hex
format.
print "%3X% % myValue
you can play around with the length specifier,
left/right formatting etc etc. Think sprintf in C...
Alan G.
More information about the Tutor
mailing list