Ok, thanks. It works for me.
regards,
Am Di., 22. Okt. 2019 um 11:29 Uhr schrieb Matt Wheeler :
>
>
> On Tue, 22 Oct 2019, 09:44 joseph pareti, wrote:
>
>> the following code ends in an exception:
>>
>> import re
>> pattern = 'Sottoscrizione unica soluzione'
>> mylines = []
On Tue, 22 Oct 2019, 09:44 joseph pareti, wrote:
> the following code ends in an exception:
>
> import re
> pattern = 'Sottoscrizione unica soluzione'
> mylines = []# Declare an empty list.
with open ('tmp.txt', 'rt') as myfile: # Open tmp.txt for reading tex
the following code ends in an exception:
import re
pattern = 'Sottoscrizione unica soluzione'
mylines = []# Declare an empty list.
with open ('tmp.txt', 'rt') as myfile: # Open tmp.txt for reading text.
for myline in myfile: # For each lin
My stab at it:
My stab at it:
#!/usr/bin/env python
import re
query = ' " some words" with and "withoutquotes " '
query = re.sub("\s+", " ", query)
words = []
while query.__len__():
query = query.strip()
print("Current query value: '%s'" % query)
print words
pri
On Apr 29, 3:46 pm, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm fairly new in Python and I haven't used the regular expressions
> enough to be able to achieve what I want.
> I'd like to select terms in a string, so I can then do a search in my
> database.
>
> query = ' " some words" with an
On Apr 29, 9:46 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm fairly new in Python and I haven't used the regular expressions
> enough to be able to achieve what I want.
> I'd like to select terms in a string, so I can then do a search in my
> database.
>
> query = ' " some words" with a
On Apr 29, 9:20 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Apr 29, 8:46 am, Julien <[EMAIL PROTECTED]> wrote:
>
> > I'd like to select terms in a string, so I can then do a search in my
> > database.
>
> > query = ' " some words" with and "without quotes " '
> > p = re.compile(magic
On Apr 29, 6:46 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm fairly new in Python and I haven't used the regular expressions
> enough to be able to achieve what I want.
> I'd like to select terms in a string, so I can then do a search in my
> database.
>
> query = ' " some words" with an
On Apr 29, 2:46 pm, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm fairly new in Python and I haven't used the regular expressions
> enough to be able to achieve what I want.
> I'd like to select terms in a string, so I can then do a search in my
> database.
>
> query = ' " some words" with an
Julien <[EMAIL PROTECTED]> writes:
> I'm fairly new in Python and I haven't used the regular expressions
> enough to be able to achieve what I want.
> I'd like to select terms in a string, so I can then do a search in my
> database.
>
> query = ' " some words" with and "withoutquotes "
Julien wrote:
Hi,
I'm fairly new in Python and I haven't used the regular expressions
enough to be able to achieve what I want.
I'd like to select terms in a string, so I can then do a search in my
database.
query = ' " some words" with and "withoutquotes " '
p = re.compile(magic_reg
| # Double Quote Text
|"# match a double quote
|(# - Two Possiblities:
|\\. # match two backslashes followed by anything
(include newline)
||# OR
|[^"]
Julien wrote:
Hi,
I'm fairly new in Python and I haven't used the regular expressions
enough to be able to achieve what I want.
I'd like to select terms in a string, so I can then do a search in my
database.
query = ' " some words" with and "withoutquotes " '
p = re.compile(magic_reg
On Apr 29, 8:46 am, Julien <[EMAIL PROTECTED]> wrote:
> I'd like to select terms in a string, so I can then do a search in my
> database.
>
> query = ' " some words" with and "without quotes " '
> p = re.compile(magic_regular_expression) $ <--- the magic happens
> m = p.match(query)
>
>
Hi,
I'm fairly new in Python and I haven't used the regular expressions
enough to be able to achieve what I want.
I'd like to select terms in a string, so I can then do a search in my
database.
query = ' " some words" with and "withoutquotes " '
p = re.compile(magic_regular_expression)
15 matches
Mail list logo