2
* CodePress regular expressions for Perl syntax highlighting
7
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
8
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
9
{ input : /([\$\@\%]+)([\w\.]*)/g, output : '<a>$1$2</a>' }, // vars
10
{ input : /(def\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
11
{ input : /\b(alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b/g, output : '<b>$1</b>' }, // reserved words
12
{ input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
13
{ input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
16
Language.snippets = []
19
{ input : '\'',output : '\'$0\'' },
20
{ input : '"', output : '"$0"' },
21
{ input : '(', output : '\($0\)' },
22
{ input : '[', output : '\[$0\]' },
23
{ input : '{', output : '{\n\t$0\n}' }
26
Language.shortcuts = []