Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: artician on July 02, 2014, 08:47:03 PM

Title: Matching smaller strings within larger strings
Post by: artician on July 02, 2014, 08:47:03 PM
Looking for a way to create a profanity filter that will take one single string and find it within a longer string.  For example, where XXXX is the profanity:
Find "XXXX" in "abcdziXXXXplque".

Any ideas?
Title: Re: Matching smaller strings within larger strings
Post by: artician on July 08, 2014, 06:15:19 PM
*boink*
Title: Re: Matching smaller strings within larger strings
Post by: Alex Chouls on July 08, 2014, 08:42:39 PM
Use the String Contains action.

If you need to check a lot of strings you should probably look into Array Maker actions....

If it's an online project you might look into profanity filtering services like this:
http://www.webpurify.com/

Title: Re: Matching smaller strings within larger strings
Post by: artician on July 09, 2014, 03:23:30 AM
Oh that's a nice alternative I wasn't aware of (filtering services I mean). 

Either way, String Contains should work for what I need.  I am already using ArrayMaker for this, and splitting a text file of profanity to an array and checking against that.  It only needs to be very basic so I think this should work just fine.

Thank you!