考虑从JSP文件这个声明(还有更多的语句像这样的JSP文件。) 声明 -如何提取的java字符串的特定部分
<h:dataGrid something styleclass="styleclass1" something1
onClick="event" something2
<% this is a scriplet tag %>
something3
style="style1">
<h:output text>hello i am text</h:output text>
</h:dataGrid>
我想是提取(和它存储在某处)的部分从 “<” 到 “>”,其中:
< - is the one in "<h:dataGrid"
> - is the one in "style1>" and not the('>') one that appears in the end
of "</h:dataGrid>" or "<h:output text>" or "</h:output text>"
问题是文本的b/W & &在多线... & &有s个criplet它们之间的标签.. 所以我不知道如何提取这个特殊的字符串.. 我试着用一些使用正则表达式,但无法找到确切的..
(这只是一个例子& &,而不是这种“”标记也可以在这一行是什么样 再次:
<h:output text>hello i am text</h:output text>
我想提取字符串“<”钱柜“>”其中:
< - is the one in starting of "<h:output text>"
> - is the one in ending of "<h:output text>" and not the one in "</h:output text>"
然而差值B/W该exmple和上面提到的一个是,这个人是不是多行,并且不包含任何scriplet标签 )
能有人帮我出去this..any具体方法还是正则表达式?