in reply to Converting ascii to numbers

Your original code has a bug by not noticing that . doesn't match newlines without /s. Also, are you so sure you want a straight numeric translation? How would you know where cone character starts and another begins? I used a different sprintf format so you can see where characters end.

s((.))(sprintf "0x%02x ", ord $1)gs