アウトライン見出し解析用正規表現
名前のところに設定名(言語)、コメントのところに正規表現を書いてください
Text
日本語のReadMe.txtとかを読みやすくする
レベル1
■.*
レベル2
□.*
レベル3
\s*[★☆].*
レベル4
\s*[○●◎△▽▲▼].*
レベル5
\s*・.*
HTML
レベル1(見出し)
.*<[hH][1-6][\s>].*
レベル2(段落)
.*<[pP][\s>].*
JavaScript
(\bfunction\s+)\w+(?=\s*\()
VBScript
\bClass\s+\w+ \b((Public|Private)\s+)?(Function|Sub|Property\s+[SGL]et)\s+\w+\b
C++
メンバ関数を正しく選んで入れ子にしてくれるが重い・・・
operatorとコンストラクタ、デストラクタが含まれない
レベル1
^(((class|struct|union|enum)\s+)|(((\w+\s*::\s*)*\w+(\s+|\s*[&*]\s*))+(\w+\s*::\s*)*\w+\s*\())[^;]*$
レベル2
^\s+((\w+\s*::\s*)*\w+(\s+|\s*[&*]\s*))+(\w+\s*::\s*)*\w+\s*\([^;]*$
Perl
\b(sub)\s+\w+
Ruby
レベル1
^(module|def|class)\s+\w+.*$
レベル2
^\s+(module|def|class)\s+\w+.*$
PHP
(\bfunction\s+)\w+(?=\s*\() \bclass\s+\w+
Python
\b(class|def)\s+\w+\b
Ini
\[[^\]]+\]
verilog
レベル1
^(module)\s+.*$
レベル2
^(always|assign|function|task)+\s+.*$
レベル3
^\s*(if|else|begin|case)+\s+.*$