Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

string.sub() with patterns?

edited December 2013 in General Posts: 577

Hi! For a project I'm working on, I need to subtract a few unneeded words. I could just write a couple string.sub()'s to get rid of them, but the problem is I don't know how many there are, since its a user choice. So is there a way with string.sub or another method to get rid of certain keywords? Here is an example: "like, the cat is like the best." And since that's not correct grammar, I want to remove the "likes" in that sentence. Any suggestions? Please let me know if you need further explaining.




Sign In or Register to comment.