Wiki source code of RegEx

Last modified by Asbjørn Ulsberg on 2018/09/06 14:42
Show last authors
1 {{velocity}}
2 #set ($content = $doc.getContent())
3 #set ($pattern = $regextool.compile('\(%\s+class="jumbotron"\s+%\)\s+\(\(\(\s+\(%\s+class="container"\s+%\)\s+\(\(\(\s+(.+)\s+\)\)\)\s+\)\)\)'))
4 #set ($matcher = $pattern.matcher($content))
5 #if ($matcher.find())
6 $matcher.group(1)
7 #else
8 No match!
9 #end
10 {{/velocity}}
11
12 (% class="jumbotron" %)
13 (((
14 (% class="container" %)
15 (((
16 ... Content here ...
17 )))
18 )))