Steven D'Aprano wrote:
On Sun, 07 Feb 2010 03:53:49 +0100, Alf P. Steinbach wrote:
Given the function hashlib.sha256, enumerate all the possible inputs
that give the hexadecimal result
0a2591aaf3340ad92faecbc5908e74d04b51ee5d2deee78f089f1607570e2e91.
I tried some parrot variants but no
On Sun, 07 Feb 2010 20:19:53 -0500, Steve Holden wrote:
Steven D'Aprano wrote:
On Sun, 07 Feb 2010 03:53:49 +0100, Alf P. Steinbach wrote:
Given the function hashlib.sha256, enumerate all the possible inputs
that give the hexadecimal result
On Feb 6, 1:36 pm, hzh...@gmail.com hzh...@gmail.com wrote:
Hi,
I am a fresh man with python. I know there is regular expressions in
Python. What I need is that given a particular regular expression,
output all the matches. For example, given “[1|2|3]{2}” as the regular
expression
Please check out this example on the pyparsing wiki,
invRegex.py:http://pyparsing.wikispaces.com/file/view/invRegex.py. This code
implements a generator that returns successive matching strings for
the given regex. Running it, I see that you actually have a typo in
your example.
print
Hi,
I am a fresh man with python. I know there is regular expressions in
Python. What I need is that given a particular regular expression,
output all the matches. For example, given “[1|2|3]{2}” as the regular
expression, the program should output all 9 matches, i.e., 11 12 13
21 22 23 31 32 33
In article
ee2cfd35-3171-4ee7-ad3a-cf117e552...@r24g2000yqd.googlegroups.com,
hzh...@gmail.com hzh...@gmail.com wrote:
Hi,
I am a fresh man with python. I know there is regular expressions in
Python. What I need is that given a particular regular expression,
output all the matches
Roy Smith r...@panix.com writes:
hzh...@gmail.com hzh...@gmail.com wrote:
What I need is that given a particular regular expression, output
all the matches.
[…]
Please enumerate all the strings which match .*. Use additional
sheets of paper if needed.
+1 QOTW
--
\ “Are you
-cf117e552...@r24g2000yqd.googlegroups.com,
hzh...@gmail.com hzh...@gmail.com wrote:
Hi,
I am a fresh man with python. I know there is regular expressions in
Python. What I need is that given a particular regular expression,
output all the matches. For example, given ³[1|2|3]{2
On Sat, 06 Feb 2010 16:05:15 -0800, hzh...@gmail.com wrote:
Thanks for your reply.
So there isn't such a routine just because some of the regular
expressions cannot be enumerated. However, some of them can be
enumerated. I guess I have to write a function myself.
How do you expect to tell
for a given program?
This, in turn, is equivalent to the Halting Problem -- if you can solve
one, you can solve the other. You might like to google on the Halting
Problem before you spend too much time on this.
Hm, well, text editors /regularly/ do repeated regular expression searches,
producing
?
This, in turn, is equivalent to the Halting Problem -- if you can solve
one, you can solve the other. You might like to google on the Halting
Problem before you spend too much time on this.
Hm, well, text editors /regularly/ do repeated regular expression
searches, producing match after match
that
is usable as valid input for a given program?
This, in turn, is equivalent to the Halting Problem -- if you can
solve one, you can solve the other. You might like to google on the
Halting Problem before you spend too much time on this.
Hm, well, text editors /regularly/ do repeated regular
On 2010-02-06, Roy Smith r...@panix.com wrote:
I am a fresh man with python. I know there is regular expressions in
Python. What I need is that given a particular regular expression,
output all the matches.
[..]
Please enumerate all the strings which match .*. Use additional sheets
for a given program?
This, in turn, is equivalent to the Halting Problem -- if you can solve
one, you can solve the other. You might like to google on the Halting
Problem before you spend too much time on this.
Hm, well, text editors /regularly/ do repeated regular expression
searches, producing match
So it seems we both misunderstood the problem.
I didn't read the top level article until now, and reading it, I can't make
sense of it.
Seems that you should read the whole thing before making a post, or
else you cannot know what we are talking about.
Steven doesn't misunderstand me. We
* hzh...@gmail.com:
So it seems we both misunderstood the problem.
I didn't read the top level article until now, and reading it, I can't make
sense of it.
[1] Seems that you should read the whole thing before making a post, or
else you cannot know what we are talking about.
Steven doesn't
]
context-sensitive linear-bounded automaton[2]
recursively-enumerable Turing machine
However, any regular expression syntax which allows backreferences
(including the POSIX specification) isn't actually regular in the formal
sense (as it requires an infinite number of states
On Sat, Jan 23, 2010 at 02:45:41AM EST, Terry Reedy wrote:
On 1/22/2010 9:58 PM, Chris Jones wrote:
Do you mean I should just read the file one character at a time?
Whoops, my misdirection (you can .read(1), but this is s l o w.
I meant to suggest processing it a char at a time.
Chris Jones wrote:
On Fri, Jan 22, 2010 at 05:07:13PM EST, Arnaud Delobelle wrote:
[..]
import codecs
from collections import defaultdict
tcounters = defaultdict(int)
f = codecs.open('/home/gavron/git/screen/src/screen.c', 'r', utf-8)
for c in f.read():
tcounters[c] += 1
for c,
I was writing a script that counts occurrences of characters in source code
files:
#!/usr/bin/python
import codecs
tcounters = {}
f = codecs.open('/home/gavron/git/screen/src/screen.c', 'r', utf-8)
for uline in f:
lline = []
for char in uline[:-1]:
lline += [char]
counters = {}
for i
Chris Jones cjns1...@gmail.com writes:
I was writing a script that counts occurrences of characters in source
code files:
#!/usr/bin/python
import codecs
tcounters = {}
f = codecs.open('/home/gavron/git/screen/src/screen.c', 'r', utf-8)
for uline in f:
lline = []
for char in
On Fri, Jan 22, 2010 at 05:07:13PM EST, Arnaud Delobelle wrote:
[..]
import codecs
from collections import defaultdict
tcounters = defaultdict(int)
f = codecs.open('/home/gavron/git/screen/src/screen.c', 'r', utf-8)
for c in f.read():
tcounters[c] += 1
for c, n in
On 1/22/2010 4:47 PM, Chris Jones wrote:
I was writing a script that counts occurrences of characters in source code
files:
#!/usr/bin/python
import codecs
tcounters = {}
f = codecs.open('/home/gavron/git/screen/src/screen.c', 'r', utf-8)
for uline in f:
lline = []
for char in
On Fri, Jan 22, 2010 at 08:46:35PM EST, Terry Reedy wrote:
On 1/22/2010 4:47 PM, Chris Jones wrote:
I was writing a script that counts occurrences of characters in source code
files:
#!/usr/bin/python
import codecs
tcounters = {}
f = codecs.open('/home/gavron/git/screen/src/screen.c',
On 1/22/2010 9:58 PM, Chris Jones wrote:
On Fri, Jan 22, 2010 at 08:46:35PM EST, Terry Reedy wrote:
Do you mean I should just read the file one character at a time?
Whoops, my misdirection (you can .read(1), but this is s l o w.
I meant to suggest processing it a char at a time.
1. If
How can I make a regular expression that will match every occurrence
of a group and return each occurrence as a group match? For example,
for a string -c-c-c-c-c, how can I make a regex which will return a
group match for each occurrence of -c?
--
http://mail.python.org/mailman/listinfo/python
pinkisntwell schrieb:
How can I make a regular expression that will match every occurrence
of a group and return each occurrence as a group match? For example,
for a string -c-c-c-c-c, how can I make a regex which will return a
group match for each occurrence of -c?
Why is this flagged OT
On Nov 9, 1:53 pm, pinkisntwell pinkisntw...@gmail.com wrote:
How can I make a regular expression that will match every occurrence
of a group and return each occurrence as a group match? For example,
for a string -c-c-c-c-c, how can I make a regex which will return a
group match for each
On Mon, 9 Nov 2009 05:53:00 -0800 (PST), pinkisntwell pinkisntw...@gmail.com
wrote:
How can I make a regular expression that will match every occurrence
of a group and return each occurrence as a group match? For example,
for a string -c-c-c-c-c, how can I make a regex which will return a
group
pinkisntwell pinkisntw...@gmail.com wrote:
How can I make a regular expression that will match every occurrence
of a group and return each occurrence as a group match? For example,
for a string -c-c-c-c-c, how can I make a regex which will return a
group match for each occurrence of -c?
Where
En Mon, 09 Nov 2009 12:59:53 -0300, Jon Clements jon...@googlemail.com
escribió:
On Nov 9, 1:53 pm, pinkisntwell pinkisntw...@gmail.com wrote:
How can I make a regular expression that will match every occurrence
of a group and return each occurrence as a group match? For example
On Oct 24, 12:00 am, Edward Dolan byteco...@gmail.com wrote:
No, you're not missing a thing. I am ;) Something was happening with
the triple-quoted
strings when I pasted them. Here is hopefully, the correct
code.http://codepad.org/OIazr9lA
The output is shown on that page as well.
Sorry
No, you're not missing a thing. I am ;) Something was happening with
the triple-quoted
strings when I pasted them. Here is hopefully, the correct code.
http://codepad.org/OIazr9lA
The output is shown on that page as well.
Sorry for the line noise folks. One of these days I'm going to learn
gnus.
are hella fun to play with.
You have
to ask yourself, Do I really _need_ to use a regular expression here?
--
http://mail.python.org/mailman/listinfo/python-list
I can see why this line could wrap
1.E-08 1.58024E-06 0.0048 1.E-08 1.58024E-06
0.0048
But this one?
1.E-07 2.98403E-05
0.0018
anyway, here is the code - http://codepad.org/Z7eWBusl
--
http://mail.python.org/mailman/listinfo/python-list
will probably fail. At that point, you have to fiddle
with
the re to get it back on course.
Don't get me wrong, regular expressions are hella fun to play with.
You have
to ask yourself, Do I really _need_ to use a regular expression here?
In this simplified example I don't really need regular
', '0.0017')
('1.93417E-04', '0.0012')]
as a result. I have the regular expression pattern
fp1 = '([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)\s+'
which can find a floating point number followed by some space. I can
find three floats with
found = re.findall('%s%s%s' %fp1, text)
My question is, how can I use
to capture the two or three floating point numbers in each line
and store them in a tuple. I want to find all such tuples such that I
have
[('1.E-08', '1.58024E-06', '0.0048'),
[snip]
('5.E+00', '2.42717E-05', '0.0017')
('1.93417E-04', '0.0012')]
as a result. I have the regular
I have text that looks like the following
(but all in one string with '\n' separating the lines):
I want to capture the two or three floating point numbers in each line
and store them in a tuple.
I have the regular expression pattern
Jeremy
For a non-regular
504cr...@gmail.com wrote:
No -- sorry -- I don't want to use BeautifulSoup (though I have for
other projects). Humor me, please -- I'd really like to see if this
can be done with just regular expressions.
I think the reason why people are giving funny comments here is that you
failed to
On Thu, 01 Oct 2009 22:10:55 -0700, 504cr...@gmail.com wrote:
I'm kind of new to regular expressions
The most important thing to learn about regular expressions is to learn
what they can do, what they can't do, and what they can do in theory but
can't do in practice (usually because of
On Oct 2, 11:14 pm, greg g...@cosc.canterbury.ac.nz wrote:
Brian D wrote:
This isn't merely a question of knowing when to use the right
tool. It's a question about how to become a better developer using
regular expressions.
It could be said that if you want to learn how to use a
hammer,
504cr...@gmail.com a écrit :
I'm kind of new to regular expressions, and I've spent hours trying to
finesse a regular expression to build a substitution.
What I'd like to do is extract data elements from HTML and structure
them so that they can more readily be imported into a database
On Oct 2, 12:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote:
I'm kind of new to regular expressions, and I've spent hours trying to
finesse a regular expression to build a substitution.
What I'd like to do is extract data elements from HTML and structure
them so that they can more readily
Paul McGuire wrote:
On Oct 2, 12:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote:
I'm kind of new to regular expressions, and I've spent hours trying to
finesse a regular expression to build a substitution.
What I'd like to do is extract data elements from HTML and structure
them so
On Oct 2, 1:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote:
I'm kind of new to regular expressions, and I've spent hours trying to
finesse a regular expression to build a substitution.
What I'd like to do is extract data elements from HTML and structure
them so that they can more readily
the regular expression fails. The
structure of the page I'm scraping is uniform in the production of
tags -- it's an old ASP page that pulls data from a database.
What's different in the first tr row is the appearance of a comma, a
# pound symbol, and a number (, Inc #4). I'm making the assumption
that's
, and I've spent hours trying to
finesse a regular expression to build a substitution.
What I'd like to do is extract data elements from HTML and structure
them so that they can more readily be imported into a database.
No -- sorry -- I don't want to use BeautifulSoup (though I have for
other
Brian D wrote:
This isn't merely a question of knowing when to use the right
tool. It's a question about how to become a better developer using
regular expressions.
It could be said that if you want to learn how to use a
hammer, it's better to practise on nails rather than
screws.
--
Greg
--
I'm kind of new to regular expressions, and I've spent hours trying to
finesse a regular expression to build a substitution.
What I'd like to do is extract data elements from HTML and structure
them so that they can more readily be imported into a database.
No -- sorry -- I don't want to use
I have the following source code
import re
d = 'RTCB\r\nsignature:\xf1\x11
2009/9/8 找尋自己的一片天 command@alexbbs.twbbs.org:
I have the following source code
import re
d = 'RTCB\r\nsignature:\xf1\x11
On Tue, 08 Sep 2009 09:21:35 +, §äŽmŠÛ€vªº...@€ù€Ñ wrote:
I have the following source code
import re
d = 'RTCB\r\nsignature:\xf1\x11
\xde\x10\xfe\x0f\x9c\x10\xf6\xc9_\x10\xf3\xeb\x10\xf2Zt\x10\xef\xd2\x91
Hello,
I would like to change the string (1 and (2 or 3)) by (x[1] (x
[2] || x[3])) using regular expression...
Anyone can help me ?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 20 Aug 2009 00:18:23 -0700, Pierre wrote:
Hello,
I would like to change the string (1 and (2 or 3)) by (x[1] (x
[2] || x[3])) using regular expression... Anyone can help me ?
Do you mean you want to change the string into (x[1] (x[2] || x[3])) ?
Does it have to be using
Pierre wrote:
I would like to change the string (1 and (2 or 3)) by (x[1] (x
[2] || x[3])) using regular expression...
Anyone can help me ?
re.compile(r(\d+)).sub(rx[\1], (1 and (2 or 3)))
'(x[1] and (x[2] or x[3]))'
re.compile(and|or).sub(lambda m, d={and:, or:||}:
d[m.group()], _)
'(x
On Tue, 28 Jul 2009 16:12:19 -0700, nickname wrote:
I'm a newbie with python. I am looking to write a regex
program which can take in a piece of text and remove some parts of it
and supply the remaining parts back.
The input can be something like:
scriptdocument.write(h +e+ ll+
2009/7/29 Nobody nob...@nowhere.com:
The output should be something like
scriptdocument.write(hello my name is 21c;)/script
import re
r = re.compile(r'\s*\+\s*')
s = r'''scriptdocument.write(h +e+ ll+ o+ m +y+ n+ame+
is +21c;)/script'''
r.sub('', s)
Nobody's solution is good.
On Tue, Jul 28, 2009 at 9:11 PM, tiefeng wu iceberg...@gmail.com wrote:
2009/7/29 Nobody nob...@nowhere.com:
The output should be something like
scriptdocument.write(hello my name is 21c;)/script
import re
r = re.compile(r'\s*\+\s*')
s = r'''scriptdocument.write(h +e+ ll+ o+
Hi all!
I need to parse c/cpp source files, one requirement is to extract
included header file name.
here is my solution:
p = re.compile(r'#\s*include\s+(?:()|())(.*)(?(1))(?(2))')
m = re.search(p, '#include header.h')
m.group(3)
'header.h'
m = re.search(p, '#include header.h')
m.group(3)
On Jul 23, 2009, at 11:46 AM, tiefeng wu wrote:
Hi all!
I need to parse c/cpp source files, one requirement is to extract
included header file name.
here is my solution:
p = re.compile(r'#\s*include\s+(?:()|())(.*)(?(1))(?(2))')
m = re.search(p, '#include header.h')
m.group(3)
'header.h'
m
tiefeng wu wrote:
Hi all!
I need to parse c/cpp source files, one requirement is to extract
included header file name.
here is my solution:
p = re.compile(r'#\s*include\s+(?:()|())(.*)(?(1))(?(2))')
m = re.search(p, '#include header.h')
m.group(3)
'header.h'
m = re.search(p, '#include
MRAB wrote:
I'd probably do:
p = re.compile(r'#\s*include\s+(?:([^]*)|([^]*))')
m = p.search('#include header.h')
m.group(1) or m.group(2)
'header.h'
yes, it's easier to understand.
thanks, MRAB!
I always make things complicated :P
tiefeng wu
2009-07-23
--
2009/7/24 Philip Semanchuk phi...@semanchuk.com:
I know this will sound like a sarcastic comment, but it is sincere: my
suggestion is that if you want to parse C/C++ (or Python, or Perl, or
Fortran, etc.), use a real parser, not regexes unless you're willing to
sacrifice some accuracy. Sooner
On Jul 23, 2009, at 12:36 PM, tiefeng wu wrote:
2009/7/24 Philip Semanchuk phi...@semanchuk.com:
I know this will sound like a sarcastic comment, but it is sincere:
my
suggestion is that if you want to parse C/C++ (or Python, or Perl, or
Fortran, etc.), use a real parser, not regexes
tiefeng wu iceberg...@gmail.com wrote:
I need to parse c/cpp source files, one requirement is to extract
included header file name.
If you are serious about parsing C code then you'll want to
investigate gcc-xml
http://www.gccxml.org/HTML/Index.html
This runs the gcc frontend over the code
Dear conference!
I have third party regular expression
self.pattern_main = re.compile('(\s+|\w(?:[+])?\d*(?:\.\d*)?|\w\#\d+|\(.*?\)|
\#\d+\=(?:[+])?\d*(?:\.\d*)?)')
with code
def readline(self):
self.line = self.file_in.readline().rstrip()
if (len(self.line)) : return True
Peter Fodrek wrote:
Dear conference!
I have third party regular expression
self.pattern_main = re.compile('(\s+|\w(?:[+])?\d*(?:\.\d*)?|\w\#\d+|\(.*?\)|
\#\d+\=(?:[+])?\d*(?:\.\d*)?)')
[snip]
It handles file correctly with two exceptions
1) omits ',' in the a output
2) omits minus sign
On Tue, 21 Jul 2009 14:30:47 +0100, Peter Fodrek peter.fod...@stuba.sk
wrote:
Dear conference!
I have third party regular expression
self.pattern_main =
re.compile('(\s+|\w(?:[+])?\d*(?:\.\d*)?|\w\#\d+|\(.*?\)|
\#\d+\=(?:[+])?\d*(?:\.\d*)?)')
Always use raw strings (r...) when you're
21.7.2009 v 16:50, MRAB:
Peter Fodrek wrote:
Dear conference!
I have third party regular expression
self.pattern_main = re.compile('(\s+|\w(?:[+])?\d*(?:\.\d*)?|\w\#\d
+|\(.*?\)|
\#\d+\=(?:[+])?\d*(?:\.\d*)?)')
[snip]
It handles file correctly with two exceptions
1) omits
Rhodri James wrote:
On Tue, 21 Jul 2009 14:30:47 +0100, Peter Fodrek
peter.fod...@stuba.sk wrote:
Dear conference!
I have third party regular expression
self.pattern_main =
re.compile('(\s+|\w(?:[+])?\d*(?:\.\d*)?|\w\#\d+|\(.*?\)|
\#\d+\=(?:[+])?\d*(?:\.\d*)?)')
Also, whoever wrote
need the full power of a regular expression
here. split() would do the trick:
words = self.line.split()
will return what you want for that example. It will produce different
(but more consistent) results than the regular expression for other lines,
though: for example,
MA 52.8806 , 18.0914
Terry J. Reedy tjre...@udel.edu added the comment:
I believe both 2.4 and 3.0 are no longer maintained. 2.5 only gets
security fixes. On the otherhand, fix should go into 3.2 ;-).
--
nosy: +tjreedy
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 3.0
Antoine Pitrou pit...@free.fr added the comment:
Can you include your unit test in your patch rather than as a separate
script? Existing unit tests are in Lib/test.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
jkg pyt...@slashbot.com added the comment:
Combined patch as requested by pitrou.
(Sorry. This is my first submission.)
--
Added file: http://bugs.python.org/file14486/nlcre_full.patch
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Sorry for giving you a slightly wrong indication. The email tests are
called from Lib/test/test_email.py, but it redirects to
Lib/email/test/*. In any case, there's no point in creating a separate
test script for such a detail, you should add your
to follow.
--
components: Library (Lib)
files: test_nlcre.py
messages: 90433
nosy: barry, jkg, tony_nelson
severity: normal
status: open
title: email.feedparser regular expression bug (NLCRE_crack)
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1
jkg pyt...@slashbot.com added the comment:
Patch.
--
keywords: +patch
Added file: http://bugs.python.org/file14485/nlcre.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6465
___
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile(msgid (.*)\\nmsgstr (.*)\\n\\n)
m=r.findall(s)
where s is a po file like this:
msgctxt write ubiquity commands.description
gialloporpora writes:
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile(msgid (.*)\\nmsgstr (.*)\\n\\n)
m=r.findall(s)
I don't know the syntax of a po file, but this works for the
gialloporpora wrote:
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile(msgid (.*)\\nmsgstr (.*)\\n\\n)
m=r.findall(s)
where s is a po file like this:
msgctxt write
Risposta al messaggio di Hallvard B Furuseth :
I don't know the syntax of a po file, but this works for the
snippet you posted:
arg_re = r'[^\\\]*(?:\\.[^\\\]*)*'
arg_re = '%s(?:\s+%s)*' % (arg_re, arg_re)
find_re = re.compile(
r'^msgid\s+(' + arg_re + ')\s*\nmsgstr\s+(' + arg_re +
Risposta al messaggio di MRAB :
gialloporpora wrote:
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile(msgid (.*)\\nmsgstr (.*)\\n\\n)
m=r.findall(s)
where s is a po file
Hello all,
I am having some difficulties with the non-capturing grouping in
python regular expression module.
Even the code from the online documentation (http://docs.python.org/
howto/regex.html#non-capturing-and-named-groups) does not seem to
work.
As per the docs given in the link above
On Jun 27, 2009, at 3:28 AM, Virtual Buddha wrote:
Hello all,
I am having some difficulties with the non-capturing grouping in
python regular expression module.
Even the code from the online documentation (http://docs.python.org/
howto/regex.html#non-capturing-and-named-groups) does not seem
Virtual Buddha wrote:
Hello all,
I am having some difficulties with the non-capturing grouping in
python regular expression module.
Even the code from the online documentation (http://docs.python.org/
howto/regex.html#non-capturing-and-named-groups) does not seem to
work.
As per
group != groups
match.group() or match.group(0) gives you a special group that comprises the
whole match. Regular capturing groups start at index 1, and only those are
returned by match.groups():
re.match((?:[abc])+, abc).group() # one group
'abc'
re.match((?:[abc])+, abc).groups() #
2009/6/12 meryl silverburgh.me...@gmail.com:
On Jun 11, 9:41 pm, Mark Tolonen metolone+gm...@gmail.com wrote:
meryl silverburgh.me...@gmail.com wrote in message
I have this regular expression
...
I try adding .* at the end , but it ends up just matching the second
one.
If there can
To the OP,
I suggest if you haven't yet Kodos, to get it here
http://kodos.sourceforge.net/.
It's a python regexp debugger, a lifetime saver.
Jean-Michel
John S wrote:
On Jun 11, 10:30 pm, meryl silverburgh.me...@gmail.com wrote:
Hi,
I have this regular expression
blockRE = re.compile
On Fri, 12 Jun 2009 06:20:24 +0100, meryl silverburgh.me...@gmail.com
wrote:
On Jun 11, 9:41 pm, Mark Tolonen metolone+gm...@gmail.com wrote:
meryl silverburgh.me...@gmail.com wrote in message
Hi,
I have this regular expression
blockRE = re.compile(.*RenderBlock {\w+})
it works if my
Hi,
I have this regular expression
blockRE = re.compile(.*RenderBlock {\w+})
it works if my source is RenderBlock {CENTER}.
But I want it to work with
1. RenderTable {TABLE}
So i change the regexp to re.compile(.*Render[Block|Table] {\w+}),
but that breaks everything
2. RenderBlock (CENTER
meryl silverburgh.me...@gmail.com wrote in message
news:2d4d8624-043b-4f5f-ae2d-bf73bca3d...@p6g2000pre.googlegroups.com...
Hi,
I have this regular expression
blockRE = re.compile(.*RenderBlock {\w+})
it works if my source is RenderBlock {CENTER}.
But I want it to work with
1. RenderTable
On Jun 11, 10:30 pm, meryl silverburgh.me...@gmail.com wrote:
Hi,
I have this regular expression
blockRE = re.compile(.*RenderBlock {\w+})
it works if my source is RenderBlock {CENTER}.
But I want it to work with
1. RenderTable {TABLE}
So i change the regexp to re.compile(.*Render[Block
On Jun 11, 9:41 pm, Mark Tolonen metolone+gm...@gmail.com wrote:
meryl silverburgh.me...@gmail.com wrote in message
news:2d4d8624-043b-4f5f-ae2d-bf73bca3d...@p6g2000pre.googlegroups.com...
Hi,
I have this regular expression
blockRE = re.compile(.*RenderBlock {\w+})
it works if my
Hi
I have a text file as follows:
testName = (
someParam = value1
anotherParam = (value2, value3)
)
how do I write a regular expression to get all the contents of the
file which are between the first and last parentheses.
In this case, I want:
someParam = value1
anotherParam = (value2
On 5/7/2009 4:51 PM Rajanikanth Jammalamadaka said...
Hi
I have a text file as follows:
testName = (
someParam = value1
anotherParam = (value2, value3)
)
how do I write a regular expression to get all the contents of the
file which are between the first and last parentheses.
In this case
On Fri, 08 May 2009 00:51:14 +0100, Rajanikanth Jammalamadaka
rajanika...@gmail.com wrote:
Hi
I have a text file as follows:
testName = (
someParam = value1
anotherParam = (value2, value3)
)
how do I write a regular expression to get all the contents of the
file which are between
+0100, Rajanikanth Jammalamadaka
rajanika...@gmail.com wrote:
Hi
I have a text file as follows:
testName = (
someParam = value1
anotherParam = (value2, value3)
)
how do I write a regular expression to get all the contents of the
file which are between the first and last parentheses
Thanks for your hints. Usually, all my files are utf-8. Obviously, I
somehow managed to inadvertently switch the encoding when creating
this specific file. I have no idea how this could happen.
Simon
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
You're almost there:
re.subn('\x61','b','')
or better yet:
re.subn(r'\x61','b','')
Wouldn't that becomes a literal \x61 instead of a as it is inside raw
string?
--
http://mail.python.org/mailman/listinfo/python-list
801 - 900 of 1822 matches
Mail list logo