Eddie 14 Posted May 8, 2012 Report Share Posted May 8, 2012 Hi, i wonder how to use $replace regular expression for replace the following: from: abcdefghi to: abc,tdef,tghi,t Thanks for help! Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted May 8, 2012 Report Share Posted May 8, 2012 Here you goclear list(%abc list) add list to list(%abc list, $list from text("abc def ghi", " "), "Delete", "Global") loop($list total(%abc list)) { add item to list(%abc list edited, $replace regular expression($next list item(%abc list), "$", ",t"), "Delete", "Global") } Quote Link to post Share on other sites
Eddie 14 Posted May 9, 2012 Author Report Share Posted May 9, 2012 thanks! But you use loop, is this the only way? how to replace multi-line one time with regular expressions? Quote Link to post Share on other sites
Legend 181 Posted May 9, 2012 Report Share Posted May 9, 2012 Using a list you need a loop... you can try saving it as a #variable and try the same regex... not sure if it will work but it might be worth a shot... Quote Link to post Share on other sites
Praney Behl 314 Posted May 9, 2012 Report Share Posted May 9, 2012 thanks! But you use loop, is this the only way? how to replace multi-line one time with regular expressions? To do it in one go, save the list to a variable and replace regular expression to the variable Quote Link to post Share on other sites
Eddie 14 Posted May 9, 2012 Author Report Share Posted May 9, 2012 yes,save list to a variable is good idea, but how to use regular expression to the variable? 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.