P is for Practical | |
PerlMonks |
Re: Removing duplicate substrings from a string - is a regex possible?by arhuman (Vicar) |
on Jul 23, 2001 at 17:46 UTC ( [id://99016]=note: print w/replies, xml ) | Need Help?? |
Something like : Could be a an approach. But please give us more info about what you're manipulating for we can handle the (always present) special cases.... For a more precise answer, you should for example define : How many times a string could be repeated (only once, more?), what duplicates should be keept (first one, last one ?), if the duplicate can include a slash... UPDATE : But as always all the useful info are in: "Only Bad Coders Code Badly In Perl" (OBC2BIP)
In Section
Seekers of Perl Wisdom
|
|