I have an XML file, as is the text file: -
/ P> : -
Sorting and simulation between the Sanjivan Saxena parallel integer CRCW model. 607-619 1996 33 Eta Info
How can I take action on using regex? Please << p>
A xml
or html
Using the HTML parser, such as beautiful soup
or lxml
module, but use the following pattern as an option:
& Gt; & Gt; & Gt; S = "" "& lt; Xml version =" 1.0 "encoding =" ISO-8859-1 "? & Gt; ... & lt ;! DOCTYPE dblp system" dblp.dtd "& gt; ... & Lt; dblp & gt; .. & lt; article mdate = "2011-01-11" key = "journal / acta / saxena 9 6" & gt; ... & lt; author & gt; Sanjeev Saxena & lt; / Author & gt; ... & lt; title & gt; parallel integer sorting and simulation between CRCW model. & Lt; / title & gt; ... & lt; page & gt; 607-619 & lt; / Pages & gt; ... & lt; year & gt; 1996 & lt; / year & gt; ... & lt; volume & gt; 33 & lt; / volume & gt; ... & lt; Journal & Gt; Acta Info. & Lt; / Journal & gt; ... & lt; Number & gt; 7 & lt; / Numbers & gt; ... & lt; url & gt; D Ji / journals / Acta / Acta 33.html # Saxena 96 & lt; / url & gt; ... and & lt; ee & gt; http: //dx.doi.org/10.1007/BF03036466< / ee & gt; ... & lt; / article & gt; ... & lt; article mdate = "2011-01-11" key = "journals / acta / Simon 83" & gt; ... & lt; author & gt; Hans-Uchich Simon ... ... matches in trees and trees and nets. & Lt; / Heading & gt; ... & lt; Page & gt; 227-248 & lt; / Page & gt; ... & lt; Year & gt; 1983 & lt; / Year & gt; ... & lt; Quantity & gt; 20 & lt; / Volume> ... & lt; Journal & gt; Eta Info & Lt; / Journal & gt; ... & lt; Url & gt; DB / Journal / Acta / Acta 20.html # Simon 83 & lt; / Url & gt; ... & lt; Ee & gt; Http: //dx.doi.org/10.1007/BF01257084< / Ee & gt; ... & lt; / Article & gt; ">" Gt;> Import re>>> l = ['Authors', 'Page', 'Year', 'Quantity', 'Journal'] & gt; & gt; & gt; ; Pat = r '|'. (('& Lt; {} & gt; (. *) & Lt;}};} in format i (i, i) i))> gt; & gt; Gt; [I No. Saxena ',' 607-619 ',' 1996 ',' 33 ',' Acta Info ',' Hans-Alich Simon ',' 227-248 ',' 1983 ' '20', 'Acta Info'].
And if you want to get the word from the input, you should follow the additional commands:
Enter name = raw_input ('Separate with name'): Enter the name: ') l = names.split ()
No comments:
Post a Comment