in reply to Converting decimal value to hex
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+$//.
|
|---|