Showing posts with the label python-re

[FIXED] re.sub replace with matched content

Issue Trying to get to grips with regular expressions in Python, I'm trying to output some HTML…

[FIXED] Replace An Exact Grouped Part in RegEx Python

Issue I have a template that I need to replace a part of that using Regex in Python. Here is my tem…

[FIXED] Regular Expression with Two Names: One With Middle Initial and One Without

Issue I'm attempting to identify the names in this string, using regex ( https://regex101.com )…

[FIXED] search a var in script tag by bs4 & python

Issue url = "www.xxxx.com" rlink = requests.get(url, cookies=cookies).content html = Beau…

[FIXED] Python - Disect/Tokenize and Iterate Over Segments of Multilined Text with re

Issue Assuming a VCD file with a structure like the one that follows as a minimum example: #0 <…

[FIXED] Cannot pattern match patterns ending with specific characters

Issue I'm trying to match all patterns that end in bar. This is my regex pattern ".*bar$&q…

[FIXED] Re findall strings inside quote except when the quote is preceded by a number

Issue I have a long dataframe with a column that I need to extract strings that occur between quote…

[FIXED] How to create a regular expression that splits a string based on certain patterns and stops extracting if it detects another of the starting patterns?

Issue It is important that the regular expression extracts the information when it detects one of t…

[FIXED] Regular expression find and replace with quoted version of self

Issue I have some string data that I would like to covert to JSON. The strings use very non standa…

[FIXED] Regex problems with special characters (e.g. #, /) in a chord dictionary (Python)

Issue I'm working on a chord dictionary and for that I need to group the different types of cho…

[FIXED] create a regex that extracts hourly numeric values and completes with other values if it detects absences in the pre-established pattern

Issue This is my regex attempt, but it doesn't work correctly, and i don't know how to impr…

[FIXED] "?!" in regular expression

Issue import re a = re.compile('^a(?!abc)') b = re.compile('^a(?!bac)$') c = re.com…

[FIXED] Replacing replaces in a faster way

Issue I'm filtering lots of tweets and while I was doing tests on how to filter each character …

[FIXED] what am I doing wrong in regular expressions?

Issue please tell me what I'm doing wrong, I need to get the value here is the part of the cod…

[FIXED] python re how to search end of the digit from sting?

Issue How to search end of the digit from this two srting which is 0.12%? text1 = '20% of the…

[FIXED] Regular expressions using Python3 with greedy modifier not working

Issue import re s="facebook.com/https://www.facebook.com/test/" re.findall("facebook…

[FIXED] RegEx removing pair parantheses only

Issue How to replace only pair parentheses by nothing in this expression? I tried many ways, but th…

[FIXED] How to perform this conditional regex replacement task, using lookarounds for bracket & quotation characters?

Issue Currently I have this for my regex replacement: import re line = re.sub(r"\bstr\b"…

[FIXED] Django: cleaned_data for special characters and punctuation marks

Issue I want to validate the Name field in my form. Now I have in my forms.py : def clean_name(s…

[FIXED] How to get continuous repetition of a pattern in a string as a single element

Issue I am trying to replace the multiple simultaneous repetition of patterns. Suppose following is…