in reply to Re: Counting characters in a string
in thread Counting characters in a string
Very good answer, but you can simplify it to
s/(.{9}\S*\s)/$1\n/g
Note especially the use of $1 instead of \1.
Update: inserted the \s I forgot.
Update 2:As pointed to by Roy Johnson, the \S* can be left out like this:
s/(.{9}\s)/$1\n/g
Also, I changed {10} to {9} as the space is the tenth character.
|
|---|