frank1 has asked for the wisdom of the Perl Monks concerning the following question:
How can i remove the rest characters and get only John
This is the Output i need: John
$str = '/2010-04-01/Tom/Ken/Fred/John.jso'; $str =~s/Tom//g; print $str;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: remove words with regex
by choroba (Cardinal) on Dec 20, 2024 at 09:23 UTC | |
by frank1 (Monk) on Dec 20, 2024 at 09:31 UTC | |
|
Re: remove words with regex
by kikuchiyo (Hermit) on Dec 20, 2024 at 10:52 UTC | |
by Fletch (Bishop) on Dec 20, 2024 at 16:04 UTC | |
|
Re: remove words with regex
by karlgoethebier (Abbot) on Dec 20, 2024 at 17:08 UTC |