in reply to extracting names between symbols
Here is code based on my assumptions of what you need:
Output:my $transcript=q|tom t-Dick -Harry|; my @analysts= $transcript=~/([^-]+)-?/g; print qq|=$_=\n| for @analysts;
The RE can be tightentd to ignore leading/trailing spaces.:=tom t= =Dick = =Harry=
This deletes the space after =Dick.my @a= $transcript=~/\s*([^-]+\w)\s*-?/g
Theory is when you know something, but it doesn't work.
Practice is when
something works, but you don't know why it works.
Programmers combine Theory
and Practice: Nothing works and they don't know why.
-Anonymous
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: extracting names between symbols
by aka_bk (Novice) on Nov 18, 2009 at 02:07 UTC | |
by Marshall (Canon) on Nov 18, 2009 at 02:55 UTC | |
by johngg (Canon) on Nov 18, 2009 at 14:10 UTC |