1
vote
2answers
33 views

How to capture complement of a grouped regular expression in python

I want to detect C like multiline comments using regular expression(the re module in python). So it should be able to find /* this is my first comment it also has a * in it. Now I end my first ...
0
votes
5answers
48 views

Python regular expressions, how to match letters that do not belong to an alphabet

Assume that alphabet is a list of characters. I want to delete all characters from a string that don't belong to alphabet. Thus, how to match all these characters? EDIT: alphabet can have any ...
1
vote
2answers
42 views

Combine case sensitive regex and case insensitive regex into one

I have multiple filters for files (I'm using python). Some of them are glob filters some of them are regular expressions. I have both case sensitive and case insensitive globs and regexes. I can ...
1
vote
2answers
37 views

Scraping Clean Scientific Names with No Parenthesis Using regex

I'm scraping scientific names from a website using regex, and I can't figure out how to not pull the parenthesis with the scientific name. The HTML is written like this: <span ...
0
votes
1answer
43 views

Regular Expression parsing interval

I have a regular expression for parsing the interval, like [22.3, sqrt(31)) ...
0
votes
1answer
25 views

Response of a regular expression search Python

i'm trying to get to work a python script which should match a regular expression, the object producted by the much is always an empty string so i think i'm using regular expression without the needed ...
0
votes
1answer
33 views

How to go about creating an automated 'web crawler', which can record URLs and other data in a document?

I hope that I'm keeping on topic. If not, please let me know, as this is the first question I've posted here! What do I need to know to create a programme which automatically records websites visited ...
0
votes
5answers
27 views

Valid domain name regex

how should be valid domain name regex which full fill following criteria. each label max 63 characters long minimum 1 characters contains numbers, letters and '-', But should not start and end with ...
-1
votes
0answers
22 views

how to extract where part in sql using re in python?

Here is the scenario: I want to retrieve the where part accurately in a SQL using python. For sql like this: str = """ select "where" , count(*) as cnt from cdo_oplog where pt < '#{end_time}' ...
0
votes
2answers
19 views

Python Regex re.compile clarification

So i have a question about the following piece of code: def OnChanMsg(self, nick, channel, message): if 'Username' in nick.GetNick(): stripped = message.s.strip() #strips leading ...
0
votes
1answer
19 views

Python RegEx for Komodo to organize 4000 contacts

I have a huge number of approximately 4000 contacts. I imported most of my Facebook contacts into my main address book in Google, but now I have contacts with a special field "Facebook : ...
0
votes
1answer
41 views

Python regular expression; match on the last instance

I have a bunch of html I am trying to deal with. I want to delete the last half tag that I have. Basically I am starting with: </div></div><div class="_3o-d" id="education and want ...
1
vote
5answers
71 views

Getting rid of duplicate blocks in a string

I've got a string broken into pairs of letters and I'm looking for a way to get rid of all the pairs of identical letters, by inserting characters in between them, to form new pairs. Further, I'm ...
0
votes
0answers
17 views

Python 2.7 with BeautifulSoup Error: Cannot process flags argument with a compiled pattern

I'm trying to do some webcrawling in a site with BeautifulSoup. But I'm getting an error when I'm trying to get the content inside the div class AddressInfo, Here is a piece of the site that I want to ...
0
votes
1answer
31 views

Extracting strings in Python in either single or double quotes

I need help with a Python regex to extract strings either inside single or double quoted. I found a solution but the regex is in C# here: How to extract the string in the quotes (either double quotes ...

15 30 50 per page