java - How do I make this regex more general, sometimes it works and sometimes it doesn't -


I have the following regex that I am using in the Java application. Sometimes it works correctly and sometimes it does not happen.

  & lt ;! - & lt; Editable name = (\ ". * \")? & Gt; - & gt; (. *) & Lt ;! - & lt; / Editable & gt; - & gt;  

Sometimes I will get a white space before / after it, sometimes it will be text. It also goes to the area within the tag.

The main problem is that name = (\ ". * \")?> Sometimes matches more than that. I'm not sure there is something that is clear to solve, just looking at this code. XML is not a regular language, nor is there any other language with the creation of HTML or "nesting"

. Do not try to parse it with regular expressions.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -