mnranjeeth has asked for the wisdom of the Perl Monks concerning the following question:
I need to find out the
1. number of occurences %x (x is the character following the %) in the string
2. and the order in which they appear.
Is it possible to do it using a regex or is converting the string into an array and then processing it is the only way out?
If so what would be the most efficient way to do it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting the number of %'s in a string
by ikegami (Patriarch) on Dec 13, 2007 at 07:44 UTC | |
|
Re: Extracting the number of %'s in a string
by moritz (Cardinal) on Dec 13, 2007 at 07:48 UTC | |
|
Re: Extracting the number of %'s in a string
by pc88mxer (Vicar) on Dec 13, 2007 at 07:45 UTC | |
|
Re: Extracting the number of %'s in a string
by poolpi (Hermit) on Dec 13, 2007 at 07:59 UTC | |
|
Re: Extracting the number of %'s in a string
by Zaxo (Archbishop) on Dec 13, 2007 at 09:46 UTC | |
by moritz (Cardinal) on Dec 13, 2007 at 10:08 UTC |