Need help in writing regex for XML

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
pauleugene09
Forum Newbie
Posts: 3
Joined: Wed May 27, 2015 6:24 am

Need help in writing regex for XML

Post by pauleugene09 »

Need help in writing REGEX for the below output

null getattr setattr lookup access readlink read
20 0% 51515 2% 14394 0% 17896 1% 18291 1% 10 0% 115314 4%
write create mkdir symlink mknod remove rmdir
2725682 90% 17635 1% 95 0% 0 0% 0 0% 2885 0% 204 0%
rename link readdir readdir+ fsstat fsinfo pathconf
4 0% 0 0% 4 0% 6240 0% 68339 2% 16 0% 8 0%
commit
0 0%


Expected sample output:
nfsv3-null: 0
nfsv3-getattr: 51515
nfsv3-setattr: 14394
nfsv3-lookup: 17896
nfsv3-access: 18291
nfsv3-readlink: 10
nfsv3-read: 115314
nfsv3-write: 2
nfsv3-create: 17635
nfsv3-mkdir: 95
nfsv3-symlink: 0
nfsv3-mknod: 0
nfsv3-remove: 2885
nfsv3-rmdir: 204
nfsv3-rename: 4
nfsv3-link: 0
nfsv3-readdir: 4
nfsv3-readdirplus: 6240
nfsv3-fsstat: 68339
nfsv3-fsinfo: 16
nfsv3-pathconf: 8
nfsv3-commit: 0

(or)

ABC_0
null: 0
getattr: 51515
setattr: 14394
lookup: 17896
access: 18291
readlink: 10
read: 115314
write: 2
create: 17635
mkdir: 95
symlink: 0
mknod: 0
remove: 2885
rmdir: 204
rename: 4
link: 0
readdir: 4
readdirplus: 6240
fsstat: 68339
fsinfo: 16
pathconf: 8
commit: 0
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Need help in writing regex for XML

Post by requinix »

Are you reading from XML or not?
pauleugene09
Forum Newbie
Posts: 3
Joined: Wed May 27, 2015 6:24 am

Re: Need help in writing regex for XML

Post by pauleugene09 »

i can get only the first line value second line its not parsing the entire digits
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Need help in writing regex for XML

Post by requinix »

Are you reading from XML or not?
pauleugene09
Forum Newbie
Posts: 3
Joined: Wed May 27, 2015 6:24 am

Re: Need help in writing regex for XML

Post by pauleugene09 »

yes using XML
Post Reply