Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
#{{<div class="">{{Meth[#0#]}}</div>}}#
<div class="form-group form-col-2">
	#{{<div class="form-group-inline">
		<label>{{ABCDEF}}</label>
		<div class="inpt">
		{{??DropList??}}
			
		{{??DropList??}}
		</div>
	</div>}}#                                        
</div>
<div class="form-group form-col-2">
	#{{<div class="form-group-inline">
		<label>{{DEFGHI}}</label>
		<div class="inpt">
		{{??DropList??}}
			
		{{??DropList??}}
		</div>
	</div>}}#                                       
</div>


What I have tried:

i tried following expression but not get all mathces.
(?:\#\{\{)(?:.*)(?:\}\}\#)$


what i want is
1)
#{{<div class="">{{Meth[#0#]}}</div>}}#

2)
#{{<div class="form-group-inline">
		<label>{{ABCDEF}}</label>
		<div class="inpt">
		{{??DropList??}}
			
		{{??DropList??}}
		</div>
	</div>}}# 

3)
#{{<div class="form-group-inline">
		<label>{{DEFGHI}}</label>
		<div class="inpt">
		{{??DropList??}}
			
		{{??DropList??}}
		</div>
	</div>}}#  
Posted
Updated 18-Nov-17 3:15am
v2

read about Regex options: RegexOptions.multiline
Regular Expression Options | Microsoft Docs[^]

Just a few interesting links to help building and debugging RegEx.
Here is a link to RegEx documentation:
perlre - perldoc.perl.org[^]
Here is links to tools to help build RegEx and debug them:
.NET Regex Tester - Regex Storm[^]
Expresso Regular Expression Tool[^]
RegExr: Learn, Build, & Test RegEx[^]
This one show you the RegEx as a nice graph which is really helpful to understand what is doing a RegEx:
Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
 
Share this answer
 
The regular expression you have doesn't seem right. The regular expression need to look for string in between #{ and }# . Here is a working example.

cp_How-to-match-multiline-using-regex[^]

Reference:
RegEx expression that will capture everything between two characters including multiline blocks - Stack Overflow[^]
 
Share this answer
 
v2
Check this out:
#{{<div.*</div>}}#|#([\s\S]*?)#
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900