zharfan 0 Posted April 11, 2014 Report Share Posted April 11, 2014 hello guysi want ask something, i have list there are : Buy cheap medicine onlinebuy medicinebest medicineweight loss capsuleweight loss tipsbuy cheap capsulebuy new car 2014 then i will remove sentence contains medicine and weight loss. and the result are: buy cheap capsulebuy new car 2014 and my question is how to remove sentence contains medicine and weight loss using regex? please answer my question thanks for your help Quote Link to post Share on other sites
Pete 121 Posted April 11, 2014 Report Share Posted April 11, 2014 Clean_List() define Clean_List { clear list(%List) add list to list(%List, $list from text("Buy cheap medicine online buy medicine best medicine weight loss capsule weight loss tips buy cheap capsule buy new car 2014", $new line), "Delete", "Global") set(#Replace, $replace regular expression(%List, "(.*)weight(.*)|(.*)medicine(.*)", $nothing), "Global") clear list(%List) add list to list(%List, $list from text(#Replace, $new line), "Delete", "Global") set(#Replace, $nothing, "Global") } Quote Link to post Share on other sites
zharfan 0 Posted April 11, 2014 Author Report Share Posted April 11, 2014 thanks fellow ubotter, if i want to replace many words not two keyword, the list word of replace i call in block text and the variable is remove. what the command? 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.