N
nicolaspujol
Hi,
I have the following regexp code which seems to be having an issue
handling a double quote.
String strMatch_pattern="(.*action\\=\")(.*)\"";
Pattern pattern=Pattern.compile(strMatch_pattern);
Matcher matcher=pattern.matcher(new StringBuffer("Hello
action=\"nicolas\" is here post=\"post\""));
while(matcher.find())
{
String strURL=matcher.group(2);
System.out.println(strURL);
}
This prints
nicolas" is here post="post
but should really print
nicolas
Any ideas as to what i could be doing wrong?
I have the following regexp code which seems to be having an issue
handling a double quote.
String strMatch_pattern="(.*action\\=\")(.*)\"";
Pattern pattern=Pattern.compile(strMatch_pattern);
Matcher matcher=pattern.matcher(new StringBuffer("Hello
action=\"nicolas\" is here post=\"post\""));
while(matcher.find())
{
String strURL=matcher.group(2);
System.out.println(strURL);
}
This prints
nicolas" is here post="post
but should really print
nicolas
Any ideas as to what i could be doing wrong?