Find Regular Expression
From UBot Studio
(Difference between revisions)
(Created page with "$Find Regular Expression is a Text Function. The function returns a list of all matches of the provided regular expression. Find regular expression allows ...") |
|||
Line 3: | Line 3: | ||
The function returns a list of all matches of the provided regular expression. | The function returns a list of all matches of the provided regular expression. | ||
Find regular expression allows users to conduct specific searches on text strings using regular expressions. This function is used for lists, variables, or whatever piece of scraped information. | Find regular expression allows users to conduct specific searches on text strings using regular expressions. This function is used for lists, variables, or whatever piece of scraped information. | ||
+ | |||
+ | '''Text:''' The text being searched. Accepts variables and functions such as [[$next list item]], [[$list item]], [[$random list item]], [[$previous list item]], and [[$table cell]]. | ||
+ | |||
+ | '''Regular Expression:''' The regex for the text being searched for in the original text. | ||
== Example == | == Example == |
Revision as of 20:01, 1 May 2013
$Find Regular Expression is a Text Function.
The function returns a list of all matches of the provided regular expression. Find regular expression allows users to conduct specific searches on text strings using regular expressions. This function is used for lists, variables, or whatever piece of scraped information.
Text: The text being searched. Accepts variables and functions such as $next list item, $list item, $random list item, $previous list item, and $table cell.
Regular Expression: The regex for the text being searched for in the original text.
Example
set(#numbers, "12423 44456 12824 53624", "Global") navigate("http://www.ubotstudio.com/playground/simple-form", "Wait") type text(<username field>, $find regular expression(#numbers, "[1]...[3]"), "Standard")
Running the script returns the number 12423 in the username field because it is the only string that meets the regex criteria.