Sublime Forum

Matching over several lines

#1

Hello again.

Yet another question related to regex matching. How do I match in the nicest way over several lines, I have tried something likes this, but it obviously doesn’t work since I’m writing this topic:)

{ “match”: “(?i)(do)((\s|\S)*)(end;)”,
“name”: “keyword.source.pli”,
“captures”: {
“1”: { “name”: “constant.numeric.pli” }
},
“comment”: “Markup of end statements”
}

Should i use something like \n?

0 Likes

#2

I believe you want to use begin-end rules?

sublimetext.info/docs/reference/ … erns-array

0 Likes