Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70692
| From | Dave Angel <davea@davea.name> |
|---|---|
| Subject | Re:problem with regex |
| Date | 2014-04-28 15:33 -0400 |
| Organization | news.gmane.org |
| References | <caeba811-441e-42a0-9b2b-c743205b1f82@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9556.1398713268.18130.python-list@python.org> (permalink) |
dimmaim@gmail.com Wrote in message:
> i want to find a specific urls from a txt file but i have some issus. First when i take just two lines from the file with copy paste and assign it to a variable like this and it works only with triple quotes
>
> test='''_*_n.jpg","timelineCoverPhoto":"{\"focus\":{\"x\":0.5,\"y\":0.386925795053},\"photo\":{\"__type__\":{\"name\":\"Photo\"},\"image_lowres\":{\"uri\":\"https://fbcdn-photos-f-a.akamaihd.net/*-*-*
Why did you start a second thread with similar content two minutes
after the first? Do you expect us to compare the two messages and
figure out what you changed, or were you just impatient for a
response? I only check in here about 6 times a day, and I
imagine some might be even less often.
Your test string literal has lots of backslashes in it, which get
interpreted into escape sequences in a literal, but not in a
file. If that's really what the file looks like, you're going
to want to use a raw string. I agree with Roy, you're probably
not getting the same string the two ways.
--
DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
problem with regex dimmaim@gmail.com - 2014-04-28 05:52 -0700 Re: problem with regex Roy Smith <roy@panix.com> - 2014-04-28 09:03 -0400 Re:problem with regex Dave Angel <davea@davea.name> - 2014-04-28 15:33 -0400
csiph-web