e.g.
By using regular expression, I can easily extract the company number in two lines:
So the result is a list of company numbers:
['39227', '65860', '39639', '68942', '68979', '68998', '68938', '62950'.....]
regex = re.compile(r'.*\((\d{5})\)') company_value_list = [regex.match(item.text).group(1) for item in company_list if re.match(regex, item.text) is not None]
So the result is a list of company numbers:
['39227', '65860', '39639', '68942', '68979', '68998', '68938', '62950'.....]
No comments:
Post a Comment