Home Download Buy Blog Forum Support

Matching over several lines

Matching over several lines

Postby Adagioklez on Tue Mar 15, 2011 6:48 pm

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?
Adagioklez
 
Posts: 15
Joined: Fri Feb 25, 2011 1:03 pm

Re: Matching over several lines

Postby guillermooo on Tue Mar 15, 2011 6:50 pm

I believe you want to use begin-end rules?

http://sublimetext.info/docs/reference/ ... erns-array
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 18 guests