Jump to content
UBot Underground

Replace not working


Recommended Posts

Getting lots of issues coming in from customers on my last compile with the latest version 4.2.2 

 

Waits not waiting, sets not setting, replaces not replacing..

 

http://screencast.com/t/djAfAyCz

 

 

What gives? These are the easy ones, usually they are nested.. Those aren't working either..

Link to post
Share on other sites
  • 1 year later...

Hey Guys,

 

I'm scratching my head here also. I'm running UbotStudio v5.5.1 and I can't rule out that a simple replace command is not working due to a bug in the UbotStudio or my programming. I have two variables, one (#TempURLs) with a block of text relative URLs and a second variable (#itemTransFullURLs) with a replace command to replace a portion of text (/transaction/) in the relative URLs with text of full path (absolute) URLs (https://www.domain.com/transaction/). The replace command will not do the replace. I've tried quotes, escaping the characters, etc. but it won't perform the replace.

 

Any help on this very simple issue would be greatful.

 

Thanks,

Rich

 

Here is the code:

set(#TempURLs"/transaction/237721973?
/transaction/237664169?
/transaction/237573269?
/transaction/237573268?
/transaction/237573267?
/transaction/237573266?
/transaction/237573265?
/transaction/237573264?
/transaction/237573263?
/transaction/237539559?
/transaction/237539558?
/transaction/237539557?
/transaction/237539556?
/transaction/237535818?
/transaction/237529132?
/transaction/237529131?
/transaction/237529130?
/transaction/237529129?
/transaction/237414323?
/transaction/237247724?
/transaction/237239665?
/transaction/237091749?
/transaction/237066567?
/transaction/237030483?""Global")
set(#itemTransFullURLs$replace("/transaction/"#TempURLs"https://www.domain.com/transaction/"), "Global")

Link to post
Share on other sites

ok, I figured it out, it was my programming, lol

 

In the replace command, I needed to swap the variable in the Search Text field with the text to be replaced in the Original Text field, resulting in the code looking like this... which works perfectly:

set(#itemTransFullURLs$replace(#TempURLs"/transaction/""https://www.domain.com/transaction/"), "Global")

 

-Rich

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...