I need a perl reg-expression which extracts the pattern as below.
Basically we want to parse and extract the rpms from the packages.xml inside RHEL cd hence looking for a pattern which extracts the contents between >xyz</rpm>.
Note there might be any set of character/white space before > symbol but all the lines ends with </rpm> pattern.
Any help with regard to this is of great help.
Eg:<rpm>acl-2.2.39-3.el5.x86_64.rpm</rpm> <rpm>acpid-1.0.4-9.el5_4.2.x86_64.rpm</rpm> <rpm>attr-2.4.32-1.1.x86_64.rpm</rpm> <rpm>audispd-plugins-1.7.13-2.el5.x86_64.rpm</rpm> <rpm>audit-1.7.13-2.el5.x86_64.rpm</rpm> <rpm>audit-libs-python-1.7.13-2.el5.x86_64.rpm</rpm> <rpm>basesystem-8.0-5.1.1.noarch.rpm</rpm> <rpm>libtermcap-2.0.8-46.1.x86_64.rpm</rpm> <rpm>bash-3.2-21.el5.x86_64.rpm</rpm> <rpm component="pamperuser04_rhel52_32" package="pam-per-user- +0.4">pam_per_user-0.4-2053.vmw.i686.rpm</rpm> <rpm component="libusb0112_rhel52_32" package="libusb-0.1.12"> +libusb-0.1.12-5.1.2053.vmw.i686.rpm</rpm> <rpm component="usbutils071_rhel52_32" package="usbutils-0.71" +>usbutils-0.71-2.1.2073.vmw.i686.rpm</rpm> <rpm component="libidn065_rhel52_32" package="libidn-0.6.5">li +bidn-0.6.5-1.1.2053.vmw.i686.rpm</rpm>
Thanks in advance
asabIn reply to Search pattern from end of line by asab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |