Simple java regular expression replace question.
Posted
by Yang
on Stack Overflow
See other posts from Stack Overflow
or by Yang
Published on 2010-03-30T17:07:01Z
Indexed on
2010/03/30
17:13 UTC
Read the original article
Hit count: 349
I have a simple xml file and I want to remove everything before the first tag. ..... item1 ....
The following java code is not working:
String cleanxml = rawxml.replace("^[\\s\\S]+<item>", "");
What is the correct way to do this? And how do I address the non-greedy issue? Sorry I'm a C# programmer.
© Stack Overflow or respective owner