Page 1 of 1

Need help in writing regex for XML

Posted: Wed May 27, 2015 6:41 am
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

Re: Need help in writing regex for XML

Posted: Wed May 27, 2015 7:06 am
by requinix
Are you reading from XML or not?

Re: Need help in writing regex for XML

Posted: Wed May 27, 2015 7:34 am
by pauleugene09
i can get only the first line value second line its not parsing the entire digits

Re: Need help in writing regex for XML

Posted: Wed May 27, 2015 4:19 pm
by requinix
Are you reading from XML or not?

Re: Need help in writing regex for XML

Posted: Thu May 28, 2015 1:23 am
by pauleugene09
yes using XML