Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub at_start { '^'; }
- sub at_end { '$'; }
- sub any { "."; }
- sub zero_or_more { "(?:$_[0])*"; }
- sub one_or_more { "(?:$_[0])+"; }
- sub optional { "(?:$_[0])?"; }
- sub remember { "($_[0])"; }
- sub one_of { "(?:" . join("|", @_) . ")"; }
- sub in_charset { "[$_[0]]"; } # I know it's broken for ']'...
- sub not_in_charset { "[^$_[0]]"; } # I know it's broken for ']'...
- at_start .
- '"' .
- zero_or_more(
- one_of(
- not_in_charset('\\"'), # Yuck, 2 levels of escaping required
- '\\' . any
- )
- ) .
- '"'
- c(a|d)+r
- <sequence>
- <element name="c" type="xs:string"/>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element name="a" type="xs:string"/>
- <element name="d" type="xs:string"/>
- </choice>
- <element name="r" type="xs:string"/>
- <sequence>
Add Comment
Please, Sign In to add comment