in reply to Re^2: repeat data at one line and grep as pre-set format
in thread repeat data at one line and grep as pre-set format
You could avoid copying $1 if you use lookbehind, but there is that pesky problem of \s+ between the digit fields, which won't work with lookbehind (variable width rule). I couldn't tell by the OP's post whether there was a fixed number of spaces or not. Assuming only two spaces (or at least a known quantity of spaces) between the column fields, you could do something like this:
perl -pe "s/(?<=\d{8}\s\s\d{5})\s+/\n/g;" t.txt
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: repeat data at one line and grep as pre-set format
by BrowserUk (Patriarch) on Jan 24, 2006 at 10:59 UTC |