Jump to content
UBot Underground

Please help with RegEx with function $replace regular expression


Recommended Posts

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

 

 

 

 

post-11102-0-69743000-1373450534_thumb.gif

Link to post
Share on other sites
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 by blackhat04yr
Link to post
Share on other sites

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...