Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Substitute 'bad words' with 'good words' according to lists

by mulander (Monk)
on Sep 25, 2005 at 18:52 UTC ( [id://494947]=note: print w/replies, xml ) Need Help??


in reply to Re: Substitute 'bad words' with 'good words' according to lists
in thread Substitute 'bad words' with 'good words' according to lists

Thank you both for the time it took you to write these responses.

pg I find your method interesting and agree that it is much more efficient than the one I came up with. Thanks for pointing me out a big mistake ( the number of iterations ).

jhourcle I must agree with the things you mentioned as additional problems that must be taken care of. This node was created not to accomplish some script but to seek a simillar method to the php one. The code you added along with your post is 'exactly' the anwser I was seeking, as it shows that it can be done almost exactly as in php. I tried a simillar solution by joining a list of bad words and a list of good words, but that was obviusly wrong as I did not know how to replace the word matched by the regex with the correspoding good word, you showed me that it can be done with a hash, and now I see how blind I was before. Thank you again, and thank you both for the time it took you to read this node and share your ideas.
  • Comment on Re^2: Substitute 'bad words' with 'good words' according to lists

Log In?
Username:
Password:

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

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

    No recent polls found