RegularExpression
Description
A RegularExpression block is a block that uses the principle of standardized Regular Expressions to get ordered data from an unordered text.
Attributes
- EliminateDuplicates [boolean]: If true, duplicate matches are eliminated from the resulting output. Default: false.
- Input [string input]: The name of a block that outputs a string.
- Name [string]: The name of the block.
- RegEx [string]: The (standardized) regular expression to use
Output connectors
- Data: a data structure containing all matches, includes groups.
- String: the first match found.
Remarks
For more information regarding regular expressions, check out http://en.wikipedia.org/wiki/Regular_expressions
Regular expressions can be tested online at http://jakarta.apache.org/regexp/
Example
1 <!-- The following example will extract the url of the Garfield comic of the day from the Garfield website. -->
2
3 <TextReader Name="reader" Url="http://www.arcamax.com/garfield"/>
4
5 <RegularExpression Name="regex" Input="reader"
6 RegEx="http://www\.arcamax\.com/cgi-bin/news/pic/[0-9]*/[0-9]*"/>
7
8 <VisualPage>
9 <VisualContent>
10 <VisualImage Input="regex"/>
11 </VisualContent>
12 </VisualPage>
