Nested delimiters
"Srinivasan Krishnan" <[email protected]> Mon, 19 Aug 2002 22:01:08 +0530
| Newsgroups | gmane.comp.jakarta.oro.user |
|---|---|
| Message-ID | <000001c2479d$d2fed9b0$9e705ea8@snrbby110683> |
grettings i am using the RegExp in JAVA for the some tricky find and replace My intention is to split the HTML attributes and work on it individually for example <img key = value key1= value1 key2= value2 > is a string i get i want to separate keys and values like key = value key1 = value1 key2 = value 2 This works by using below expression forming \\<img\\s*(.+)\\>|<ul>$1</ul>|isg greddy expression ( Greedy experession because there is a chance of %> inside as value in the Tag. This greddy expression gets all the attributes as string. To extract variables from this I use below expressionon \\s*([a-z]+)\\s*=((\\s*\"([^\"]*)\"\\s*)|(\\s*'([^']*)'\\s*)|(\\s*([^\\s ]*)\\s*)) is the regular expression i used to find key value pair But if input is key="<%="somex"%>+value.jsp" it is failing. The problem is in specifying nested "" in the input . Can you please tell me how to change the regular expression to adopt to this input. I can not use greedy expression such as because there are more inputs on the same line. Regards, Srini sk -- To unsubscribe, e-mail: <mailto:[email protected]> For additional commands, e-mail: <mailto:[email protected]>
Wipro_Disclaimer.txt
(text/plain, 515 B)
**************************Disclaimer************************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************************