Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-02-06 21:33
Flavor·Java

"
(?<elIf>#elif\((?<elIfContents>[^\)]+)\)(?<elIfResult>[\s\S]+?(?=#elif|#end)))
"
gi
Open regex in editor

Description

This is part 2 of my if else parser. Part 2 is only needed for elif statements.

Note: From the elif result from part 1 add a #end to close the statement. I might change it a bit in the future so this isn't needed.

Part 1 can be found here

Submitted by Rubeste