Link to home
Start Free TrialLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

count pattern occurance

Dear experts

I have a log file with xml data like

<party type="abc set="tyt"> <RefID referenceType="comb">1000</RefID> </party>
<party type="abc3 set="tytre"> <RefID referenceType="comb">15000</RefID> </party>
<party type="abcr set="tytrr"> <RefID referenceType="comb">16000</RefID> </party>
...

is there any way i can count the number of <party> xmls i have in the file. For instnace above i have 3 party xmls.
Any idea what the command should be?

thanks
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Roy

ASKER

Hi ozo
Do I run the command on the Unix command prompt? I am new to perl.
Thanks.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial