in reply to [Solved]:What regex changes are needed while creating xml
Does this look right?
<?xml version="1.0"?> <doc> <GI-eSTB-MIB-NPH> <eSTBUserSettingOutput> <0>INTEGER: hd1920x1080i(1)</0> </eSTBUserSettingOutput> <eSTBUserSetting43OverRide> <0>INTEGER: on480p(3)</0> </eSTBUserSetting43OverRide> </GI-eSTB-MIB-NPH> </doc>
If so:
/ ^(.*?):: ([^\s]+) \.([^\s]+)\s+= \s(.*) /x;
Two lines of input data isn't really reliable to craft a strong regex, so if the above code works, you'll just have to test it against a larger dataset.
-stevieb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What regex changes are needed while creating xml
by Perl300 (Friar) on Jun 25, 2015 at 19:21 UTC | |
by Perl300 (Friar) on Jun 25, 2015 at 21:37 UTC | |
by hippo (Archbishop) on Jun 25, 2015 at 22:56 UTC | |
by stevieb (Canon) on Jun 25, 2015 at 21:43 UTC |