Dear friends,
please give me the solution to the following query.
If a file contains multiple tags of same name, then how to get the required string between the tags, in which the string begins with "W/X"
i.e., file1.txt contains following text(please note that all the following tags are in single line)
----------------------------
<aaa> some text1</aaa><bbb> some text2</bbb><ccc> some text3</ccc><kkk>W/X12345</kkk><ddd> some text4</ddd><eee> some text5</eee><fff> some text6</fff><kkk>3333</kkk><ggg> some text7</ggg><hhh> some text8</hhh>
----------------------------
please see that above file conatins "<kkk>" twice. i.e.,
<kkk>W/X12345</kkk>
and
<kkk>3333</kkk>
I have to extract the entire string that starts with "W/X" till the end tag("</kkk>")
i.e., I need to extract "W/X12345"
this paramenter,W/X12345, length may not be constant, some times it may be
W/X123
or
W/X87789989
or
W/X90798897989
ect...
please tell me how do I get this paramenter?
it's very urgent, please reply soon.
waiting for ur reply,
swamymns