Re: Regex on a Dictionary

2018-02-15 Thread Andre Müller
Hello, this question also came up there: https://python-forum.io/Thread-Working-with-Dict-Object Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Re: Regex on a Dictionary

2018-02-13 Thread Mark Lawrence
On 13/02/18 18:08, Stanley Denman wrote: On Tuesday, February 13, 2018 at 9:41:14 AM UTC-6, Mark Lawrence wrote: On 13/02/18 13:11, Stanley Denman wrote: I am trying to performance a regex on a "string" of text that python isinstance is telling me is a dictionary. When I run the code I get

Re: Regex on a Dictionary

2018-02-13 Thread Stanley Denman
On Tuesday, February 13, 2018 at 9:41:14 AM UTC-6, Mark Lawrence wrote: > On 13/02/18 13:11, Stanley Denman wrote: > > I am trying to performance a regex on a "string" of text that python > > isinstance is telling me is a dictionary. When I run the code I get the > > following error: > > > >

Re: Regex on a Dictionary

2018-02-13 Thread Steven D'Aprano
On Tue, 13 Feb 2018 13:53:04 +, Mark Lawrence wrote: > Was the string methods solution that I gave a week or so ago so bad that > you still think that you need a regex to solve this? Sometimes regexes are needed, but often Jamie Zawinski is right: Some people, when confronted with a

Re: Regex on a Dictionary

2018-02-13 Thread Steven D'Aprano
On Tue, 13 Feb 2018 05:11:20 -0800, Stanley Denman wrote: > I am trying to performance a regex on a "string" of text that python > isinstance is telling me is a dictionary. Please believe Python when it tells you that something is a dictionary. Trust me, the interpreter knows. It doesn't matter

Re: Regex on a Dictionary

2018-02-13 Thread Mark Lawrence
On 13/02/18 13:11, Stanley Denman wrote: I am trying to performance a regex on a "string" of text that python isinstance is telling me is a dictionary. When I run the code I get the following error: {'/Title': '1F: Progress Notes Src.: MILANI, JOHN C Tmt. Dt.: 05/12/2014 - 05/28/2014 (9

Re: Regex on a Dictionary

2018-02-13 Thread alister via Python-list
On Tue, 13 Feb 2018 13:42:08 +, Rhodri James wrote: > On 13/02/18 13:11, Stanley Denman wrote: >> I am trying to performance a regex on a "string" of text that python >> isinstance is telling me is a dictionary. When I run the code I get >> the following error: >> >> {'/Title': '1F:

Re: Regex on a Dictionary

2018-02-13 Thread Rhodri James
On 13/02/18 13:11, Stanley Denman wrote: I am trying to performance a regex on a "string" of text that python isinstance is telling me is a dictionary. When I run the code I get the following error: {'/Title': '1F: Progress Notes Src.: MILANI, JOHN C Tmt. Dt.: 05/12/2014 - 05/28/2014 (9

Re: Regex on a Dictionary

2018-02-13 Thread Etienne Robillard
Hi Stanley, Le 2018-02-13 à 08:11, Stanley Denman a écrit : x=MyRegex.findall(MyDict) How about: x = [MyRegex.findall(item) for item in MyDict] Etienne -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ -- https://mail.python.org/mailman/listinfo/python-list

Regex on a Dictionary

2018-02-13 Thread Stanley Denman
I am trying to performance a regex on a "string" of text that python isinstance is telling me is a dictionary. When I run the code I get the following error: {'/Title': '1F: Progress Notes Src.: MILANI, JOHN C Tmt. Dt.: 05/12/2014 - 05/28/2014 (9 pages)', '/Page': IndirectObject(465, 0),