taufiqkyu 0 Posted September 22, 2018 Report Share Posted September 22, 2018 (edited) Hi, is there a way to add * on a space between word. the example is like this example:3 word my best city i want to change it to different variation like my * best city, my best * city or my best city* 4 word this is my cityi want to change it to different variation like this * is my city, this is * my city, this is my * city, this is my city * for 5,6, 7, or 8 word also have same variation like above.i try reguler expression. but still confuse how to set a word and change it to different variation. i dont' know how to do it. may you can help me. thanks a lot. Edited September 22, 2018 by taufiqkyu Quote Link to post Share on other sites
Sanjeev 46 Posted September 22, 2018 Report Share Posted September 22, 2018 this should get you started.. set(#main phrase,"my best city","Global")define create variations(#phrase, #insert word) { clear list(%variations) add item to list(%variations,$replace regular expression(#phrase,"(?<=\\w+)\\s(?=\\w+\\s)",#insert word),"Don\'t Delete","Global") alert($list item(%variations,0)) add item to list(%variations,$replace regular expression(#phrase,"(?<=\\w+\\s\\w+)\\s(?=\\w+)",#insert word),"Don\'t Delete","Global") alert($list item(%variations,1)) add item to list(%variations,$replace regular expression(#phrase,"$",#insert word),"Don\'t Delete","Global") alert($list item(%variations,2))}create variations("my best city", " * ") https://cl.ly/40d00b72e554 1 Quote Link to post Share on other sites
taufiqkyu 0 Posted September 23, 2018 Author Report Share Posted September 23, 2018 Thanks Sanjeev. Quote Link to post Share on other sites
Brutal 164 Posted September 24, 2018 Report Share Posted September 24, 2018 the txt spinner feature might also acheiveyour desired end result Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.