Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have the following regular expression who's intention is to strip the first match on this string and everything else on the line.
matchingText = re.search("
When I run the regular expression standalone in a file all by itself everything works fine.
However my problem is when this expression is added to a class the regular expression gives me all kinds of problems, and they are directly related to the presence of the . in regular expression. If i remove the . everything runs fine, I just dont get the desired results, the expression only matches the text exactly and excludes the rest of the line. I am a complete newbie at python, but I am guessing something in the class is interpreting the . as an important character. Any help would be greatly appreciated as its really bugging me
0 · ·