f



regex

Hi for everyone, i need to parse a text and i need to found a text like this:

<objInformation name="<%=Property.name%> version="1">

I try to parse this with this pattern but don't work:

<objInformation(\s+\w+\s*=\s*([(["|']?<\s*%\s*=\s*Property.\w+\s*%\s*>["|']?)
|(["|']?\w+["|']?)]))*>

Anybody what is wrong in this regular expresion?

Thanks,

Alejandro
0
a_narancio
8/1/2004 3:36:01 PM
comp.lang.java 3285 articles. 1 followers. Post Follow

1 Replies
706 Views

Similar Articles

[PageSpeed] 47

"a_narancio@hotmail.com (Alejandro Narancio)" wrote in comp.lang.java:

> Hi for everyone, i need to parse a text and i need to found a text like
> this: 
> 
> <objInformation name="<%=Property.name%> version="1">
> 
> I try to parse this with this pattern but don't work:
> 
> <objInformation(\s+\w+\s*=\s*([(["|']?<\s*%\s*=\s*Property.\w+\s*%\s*>["|
> ']?) 
>|(["|']?\w+["|']?)]))*>
> 
> Anybody what is wrong in this regular expresion?

    	You might want to look over the following web page which discusses 
quoting of regular expressions in Java:

    	    	regex : Java Glossary
    	    	http://mindprod.com/jgloss/regex.html
0
Randolf
8/16/2004 12:45:04 AM
Reply: