java - Required to solve this regex issue -


i need characters between particular expression. example below sample document sample document.

$condtion first text can repeated many times until while called.

$endcondition 

i need characters between $condtion , $endcondition while(matcher.find()) loop getting called 3 times. possible handle in regular expression. 1 condition must satisfied. if condition satisfied other conditions need not called.

your expression matches either \\#if\\s*\\((.*?)\\)(.*?)\\#elseif or #else or #endif. if want or around closing statement of if block have put group (?:elseif|else|endif).


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -