-
Content Count
17 -
Joined
-
Last visited
Community Reputation
5 NeutralAbout grantwood
-
Rank
Member
Contact Methods
-
Website URL
http://www.grantwoodtechnology.com
Profile Information
-
Gender
Male
-
Location
Cleveland, OH
-
Interests
Taking naps.
System Specs
-
OS
Windows 8
-
Total Memory
4Gb
-
Framework
v4.0
-
License
Developer Edition
Recent Profile Visitors
2655 profile views
-
Need Help with Extracting HTML Tags
grantwood replied to grantwood's topic in Regex (Regular Exp<b></b>ressions) 101
That will work. Thank you! I wish uBot Studio would add a multiline option. -
Need Help with Extracting HTML Tags
grantwood replied to grantwood's topic in Regex (Regular Exp<b></b>ressions) 101
If there are returns embedded in the text, then the current regex does not produce any matches. For example: <td class="amount small"> $21.99 </td> How would you modify the regex to extract the text (including any returns, tabs, spaces, etc.)? Also, how would you strip all of these characters (Ubot's $trim command only strips spaces), leaving just the amount? add list to list(%temp_list, $find regular expression(#temp, "(?<=amount\\ssmall\\\"\\>).*?(?=\\<)"), "Don\'t Delete", "Global") -
Need Help with Extracting HTML Tags
grantwood replied to grantwood's topic in Regex (Regular Exp<b></b>ressions) 101
Never mind. The list was configured to delete duplicates. Duh! -
Need Help with Extracting HTML Tags
grantwood replied to grantwood's topic in Regex (Regular Exp<b></b>ressions) 101
The regex for the quantity only returns (1) occurrence. Is that because the (2) occurrences have the same value? -
Need Help with Extracting HTML Tags
grantwood replied to grantwood's topic in Regex (Regular Exp<b></b>ressions) 101
Wow! That works perfectly. If I want to extract the quantities and amounts, would I use: add list to list(%temp_list, $find regular expression(#temp, "(?<=quantity\\ssmall\\\"\\>).*?(?=\\<)"), "Delete", "Global") add list to list(%temp_list, $find regular expression(#temp, "(?<=amount\\ssmall\\\"\\>).*?(?=\\<)"), "Delete", "Global") -
Hello, I am using the Page Scrape command to extract the text below: <td colspan="3" class="heading small"><strong>Product charges</strong></td> </tr> <tr> <td class="title small">Tuneband for iPhone 4 & iPhone 4S, Black, Grantwood Technology's Armband, Silicone Skin, and Front/Back Screen Protector</td> <td class="space"> </td> <td class="quantity small">Qty: 1</td> <td class="small"></td> <td class="amount small">$21.99</td> </tr> <tr> <td class="title small">Tuneband
-
grantwood started following Removing Trailing Returns, Need Help with Extracting HTML Tags, open links in new window and 1 other
-
You should be able to use jQuery. First, please view this video showing how to integrate jQuery with Ubot (prepared by @Fabier, not me): http://www.ubotstudio.com/forum/index.php?/topic/12822-a-quick-introduction-to-javascript Next, use this code in the $eval function. $('a[target="_blank"]').removeAttr('target'); Regards, Sean
-
Aside from the special case with the define command, are local variables visible within the entire script? Regards, Sean
- 4 replies
-
- Multithread
- Thread
-
(and 2 more)
Tagged with:
-
I created a function that duplicates the 'trim' function from PHP: http://php.net/manual/en/function.trim.php define $Trim Better(#String to Trim) { return($replace regular expression(#String to Trim, "^[\\s\\t\\r\\n\\0\\x0B]+|[\\s\\t\\r\\n\\0\\x0B]+$", $nothing)) } Regards, Sean
-
Removing Trailing Returns
grantwood replied to grantwood's topic in Regex (Regular Exp<b></b>ressions) 101
Thanks, VaultBoss! -
Hello, Is the newline character represented by \n, or\r\n? Both of these examples remove the trailing returns, but is one more 'robust' than the other? set(#string_old, "Line One Line Two Line Three{$new line}{$new line}{$new line}", "Global") set(#string_new, $replace regular expression(#string_old, "\\n+$", $nothing), "Global") set(#string_old, "Line One Line Two Line Three{$new line}{$new line}{$new line}", "Global") set(#string_new, $replace regular expression(#string_old, "[\\r\\n]+$", $nothing), "Global") Regards, Sean
-
Ubot Plugins Brainstorming - Lets think of good ideas !
grantwood replied to Aymen's topic in Plugin Development
I come from the world of FileMaker, and like Ubot, you create scripts in a proprietary language. One plugin available for that program is the ability to run PHP code, so imagine the possibilities if there was a Run PHP command in Ubot, just like we have a Run Javascript command now. Another cool feature of this FileMaker PHP plugin is the ability to turn any PHP code into its own plugin.