This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
action:Search_Clipboard [2015/07/09 14:27] jimmyhartington created |
action:Search_Clipboard [2015/07/12 22:30] mirazjordan Amplified with examples |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Search the system or a Named Clipboard using regular expressions, and capturing the results. | + | The Search Clipboard action allows you to search the system clipboard or a named clipboard for a regular expression and capture what you find to one or more variables. This can be very useful for splitting apart the contents of a clipboard. |
+ | |||
+ | |||
+ | {{:action:searchclipboard.png|}} | ||
+ | |||
+ | |||
+ | You can search for: | ||
+ | * Regular Expression, matching the case. | ||
+ | * Regular Expression, ignoring the case. | ||
+ | |||
+ | Select the variable to search using the //Search// pop-up. | ||
+ | |||
+ | Select whether or not to match the case from the //using Regular Expression// pop-up. Then enter the text to search for in the text area. | ||
+ | |||
+ | Select where to save results with the //and save capture groups to Variables// pop-up. Depending on the nature of your search you may simply be presented with an //All// option, or with the opportunity to save multiple results to multiple variables. | ||
+ | |||
+ | Examples: | ||
+ | * Use a regular expression to search through a product price list and save only certain parts of it. Given a line like | ||
+ | |||
+ | //SKU1234 Widget 1 $12.95// | ||
+ | |||
+ | this could look like the following: | ||
+ | |||
+ | Search for: (SKU\d{4})\t(.+)\t(.+) | ||
+ | |||
+ | And capture: the first and third bracketed items to save only the SKU number and the price. To work through a list you would need to include a loop or repeat of some kind. | ||
+ | |||
+ | {{:action:searchclipboardexample.png|}} | ||
+ | |||
+ | Which results in: | ||
+ | |||
+ | {{:action:searchvariableresult.png|}} |