Jump to content
UBot Underground

Derek++

Members
  • Content Count

    13
  • Joined

  • Last visited

Posts posted by Derek++

  1. Hi,

     

    I'm trying to extract the price from this text...

    <span class="star"></span>  1973 Land Rover 88 NUT & BOLT RESTORATION - $65000 (PALM BEACH )</h2>

    BTW "$" is the html escape code for the dollar sign. I'm using this code...

    set(#price, $replace regular expression(#fulltitle, "^.+$([0-9]+).*$", "$1"), "Global")
    

    Where #fulltitle is the input text from above.

     

    The regex works perfectly in Editpad Lite but not in ubot. I have tried several different variations but nothing seems to work. Also if I just use a regex like this...

    set(#price, $replace regular expression(#fulltitle, "^.*([0-9]+).*$", "$1"), "Global")

    Then I will end up with only the last digit "0" instead of the whole group "65000". What am I doing wrong?

     

  2. Hi,

     

    I have a replace regular expression that works in Editpad Lite but doesn't seem to work in Ubot. I'm trying to extract the price from this string...

     

      <span class="star"></span>
      1973 Land Rover 88 NUT & BOLT RESTORATION - $65000 (PALM BEACH )
    Using this regex replace...
     
    .+$([0-9]+).*

    replace with

    $1

    It returns the entire string.

     

    I have also tried the page scrape method using "$"  as the before and " (" as the after but that doesn't work either?

     

     

     

  3. Is there a way to use references in the $replace regular expression function?

     

    I.e...

     

    $replace regular expression(#phone,"([0-9]{3})([0-9]{3})([0-9]{4})","\\1 - \\2 -  \\2")

     

    Also when I input the above regular expression and click okay it automatically strips out the curly brackets...

     

    ([0-9]{3})([0-9]{3})([0-9]{4})

     

    turns into

     

    ([0-9]3)([0-9]3)([0-9]4)

  4. The set table cell command won't work because I'm trying get column from value from the table not set a value. What I'm looking for is something similar to the set list position function but instead of using the row number I'd like to set the list position based on the value of a column. Then get the value of another column in the corresponding row.

  5. I'm trying to get the equivalent of this to work in Ubot Studio (standard)... 

     

     

    $ui_list = array('AL','AK','AZ'); // etc

     

    $subdomains = array('AL' => 'alabama','AK' => 'alaska','AZ' => 'arizona');

     

    $domain = $subdomains[current($ui_list)].".example.com/";

     

     

    ...Since ubot arrays don't seem to support key=>value pairs I think I have to use tables but am not sure how to this.

×
×
  • Create New...