As for your actual question, the .* matches as much as it can, which is "12345\t", since \W matches "\n".
The simples solution is probably s/^(\w*)\b/$1/, unless your goal is to remove trailing white spaces. In that case, it would be s/\s+$//.
In reply to Re: Converting decimal value to hex
by ikegami
in thread Converting decimal value to hex
by coldmiser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |