Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Re: Removing duplicate substrings from a string - is a regex possible?

by arhuman (Vicar)
on Jul 23, 2001 at 19:23 UTC ( [id://99041]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Removing duplicate substrings from a string - is a regex possible?
in thread Removing duplicate substrings from a string - is a regex possible?

I think that with those new elements Hofmator is right,
regexes aren't probably the good solution.

Especially with other simple answers available like :
print join'/',grep{if(!$u{$_}){$u{$_}=1}}split'/',$data;

Note to hofmator: don't hit me too hard...
My (poor) regex was not meant to be a solution but rather to show a possible way to study
(wasn't approach bold enough ? ;-)
Anyway I++ your post beccause your rightly outline some of the problems that may arise with the regex approach...
and in particular in my poor regex approach


"Only Bad Coders Code Badly In Perl" (OBC2BIP)
  • Comment on Re: Re: Re: Removing duplicate substrings from a string - is a regex possible?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://99041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-04-16 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found