in reply to Re: REGEX detailed character replace
in thread REGEX detailed character replace
It could be generalized a bit:
$string =~ s/\|(\S+)\s([^-|]+)[-|](x+)[-|](x+)[-|](x+)[-|](x+)[-|](x+)[-|](x+)[-|](x+).*/$1,$2,$3,$4,$5,$6,$7,$8,$9,/;But that's still far from general, relying on "x" rather than [A-Za-z0-9]+ -- which I suspect comes closer (but still clumsily) to OP's "real" question." See, for example, ikegami's reply.
Update: Linkified to clarify my "this"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: REGEX detailed character replace
by marcussen (Pilgrim) on Nov 13, 2008 at 03:29 UTC |