regex - Python Regular Expression returning nothing to repeat? -
So, what I'm trying to do is parse the text file line by row in a list.
I have done this successfully. Now, I need to draw all links coming out of .html .
So I thought I would parse each line and if it were
* html . So I believe that the best way to do this is regular expression. Below is my code and there is no return error about the error being repeated in the question. I have bolded the line that refers to it.
code:
compiled = re.compile ("*. Html") // here error [m.group (0) For [compiled.search (l)] if M] I just try to remove the links that appear for this record:
Nws_NewsDetails.aspx@Site_Id=2& lang = 1 & amp; NewsID = 148513 & CATED = 1 9 & amp; Type = Home and gtype = 1.html but they Actually, random, therefore * .html
In regular expressions, * one is meta And this is a special meaning because this gives you an error. You can use the following RegEx,
re.compile (". * .HTML") Here, . * This means that any character can be multiple times (0 or more often) (which is actually * Regular Expression) and then you want to match to . , so we can call it . , because dot also has a special meaning (it matches any character), we have to save it from \ .
Comments
Post a Comment