blackhat04yr 0 Posted July 10, 2013 Report Share Posted July 10, 2013 Dear ALL I got the problems with RegEx please help me to solve this I have a content text. I want to find the string 'Ubot Studio' and replace it with 'Ubot Software', it must be replaced at n match occurrence. After replaced, show the result all. Here is my setting value set(#content, "Unlike other clunky, bloated automation suites, UBot Studio has a clean, simple, drag-and-drop interface that works with you, not against you, allowing point-and-click automation on any website, without requiring you to become a programmer to use it. No other automation software lets you simply click the “Compile” button and create stand-alone bots that work on any computer – without limitations. UBot Studio keep these executable files, give them out, or sell them, and find a new revenue stream instantly. UBot Studio can look at a website the way a human does, and actually “see” and automate pages like Flash applets, Java applets, Movie Player Applets, ActiveX controls or any other technology. UBot Studio can read RegEx and Javascript, so programmers will save hours by using their coding knowledge to write quick solutions in Javascript and the .NET regular expression engine! Ubot Studio is awesome, it really is a hidden gem. One of the only products I highly recommend.", "Global") set(#find, "Ubot Studio", "Global") set(#replace, "Ubot Software", "Global") set(#match, 2, "Global") and After that I will do the task replacement with RegEx set(#result, $replace regular expression(#content, "(((?i){#find}.*?)\{{#match}\})(?i){#find}", "$1{#replace}"), "Global") ui stat monitor("", #result) But the result is not right. You can set the #match that mean it will replace at the x+1 occurence. As you can see i can write the RegEx in EditPad and it's show the exactly i want (see the image attached) Thanks and best Regards Quote Link to post Share on other sites
pftg4 102 Posted July 10, 2013 Report Share Posted July 10, 2013 use replace command no regex needed pftg4 Quote Link to post Share on other sites
blackhat04yr 0 Posted July 10, 2013 Author Report Share Posted July 10, 2013 use replace command no regex needed pftg4Dear mate How can you use "replace" command to replace a string at second or third occurrence? Thanks and Best Regards Quote Link to post Share on other sites
blackhat04yr 0 Posted July 11, 2013 Author Report Share Posted July 11, 2013 (edited) set(#content, "Unlike other clunky, bloated automation suites, UBot Studio has a clean, simple, drag-and-drop interface that works with you, not against you, allowing point-and-click automation on any website, without requiring you to become a programmer to use it. No other automation software lets you simply click the “Compile” button and create stand-alone bots that work on any computer – without limitations. UBot Studio keep these executable files, give them out, or sell them, and find a new revenue stream instantly. UBot Studio can look at a website the way a human does, and actually “see” and automate pages like Flash applets, Java applets, Movie Player Applets, ActiveX controls or any other technology. UBot Studio can read RegEx and Javascript, so programmers will save hours by using their coding knowledge to write quick solutions in Javascript and the .NET regular expression engine! Ubot Studio is awesome, it really is a hidden gem. One of the only products I highly recommend.", "Global") set(#content, $replace regular expression(#content, "UBot Studio|Ubot Studio", "Ubot Software"), "Global") Thank you WillyWonka. But it's not show the result i want. I want to find and replace string at third match occurence (set(#match, 2, "Global") will be replaced at n+1). That mean the text will be as below after i replace Unlike other clunky, bloated automation suites, UBot Studio has a clean, simple, drag-and-drop interface that works with you, not against you, allowing point-and-click automation on any website, without requiring you to become a programmer to use it. No other automation software lets you simply click the “Compile” button and create stand-alone bots that work on any computer – without limitations. UBot Studio keep these executable files, give them out, or sell them, and find a new revenue stream instantly. UBot Software can look at a website the way a human does, and actually “see” and automate pages like Flash applets, Java applets, Movie Player Applets, ActiveX controls or any other technology. UBot Studio can read RegEx and Javascript, so programmers will save hours by using their coding knowledge to write quick solutions in Javascript and the .NET regular expression engine! Ubot Studio is awesome, it really is a hidden gem. One of the only products I highly recommend. Edited July 11, 2013 by blackhat04yr Quote Link to post Share on other sites
blackhat04yr 0 Posted July 11, 2013 Author Report Share Posted July 11, 2013 Dear All With the help of UbotDev.com. I can now to solve this issue with 2 main text function $find index and $sub string. He suggest me the first solution for this and it's worked perfectly. Thank you UbotDev.com However, you can research this issue may be an extra option .... Thanks and Best Regards 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.