A very odd behavior on the part of the Android java regex functions:
I am trying to replace "<file_info.*>" in:
<?xml version="1.0" encoding="utf-8"?>
<file_info domain_id="ac-demo" language="en" os="androidtab" version="11" >
<id string_name="app_name">MobilityPlus</id>
<!-- general buttons text -->
......
Calling: String.replaceAll( "<file_info.*>", "<resources>" );
And I get only the replaced part:
<?xml version="1.0" encoding="utf-8"?>
<resources>
And the rest is Cropped!! WHY??? I need the whole string returned and only the searched part replaced. Using at least 2 online regex testers and got exactly what I wanted, but in Android/Java it won't.
COULD THIS MEAN BUG? In GOOGLE CODE??
Any recommendations on how to go around this issue will be most appreciated! Thanks!
(Note: I tried using both String.replaceAll() and Pattern+Matcher and both yield the same results. with multiple lines flag and without, and even after removing all \t \r \n... characters)