jak 在 2021年8月6日 星期五下午4:10:05 [UTC+8] 的信中寫道:
> Il 05/08/2021 11:40, Jach Feng ha scritto:
> > I want to distinguish between numbers with/without a dot attached:
> >
> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
> re.compile(r'ch \d{1,}[.]').findall(text)
> > ['ch 1.', 'ch 23.']
Il 07/08/2021 11:18, jak ha scritto:
Il 07/08/2021 04:23, Jach Feng ha scritto:
jak 在 2021年8月6日 星期五下午4:10:05 [UTC+8] 的信中寫道:
Il 05/08/2021 11:40, Jach Feng ha scritto:
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compi
Il 07/08/2021 04:23, Jach Feng ha scritto:
jak 在 2021年8月6日 星期五下午4:10:05 [UTC+8] 的信中寫道:
Il 05/08/2021 11:40, Jach Feng ha scritto:
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
['c
Il 06/08/2021 12:57, Jach Feng ha scritto:
jak 在 2021年8月6日 星期五下午4:10:05 [UTC+8] 的信中寫道:
Il 05/08/2021 11:40, Jach Feng ha scritto:
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
['c
On 2021-08-06, jak wrote:
> Il 06/08/2021 16:17, jak ha scritto:
>> Il 06/08/2021 12:57, Jach Feng ha scritto:
>>> That's an interest solution! Where the '|' operator in re.compile()
>>> was documented?
>>
>> I honestly can't tell you, I've been using it for over 30 years. In any
>> case you can
jak 在 2021年8月6日 星期五下午4:10:05 [UTC+8] 的信中寫道:
> Il 05/08/2021 11:40, Jach Feng ha scritto:
> > I want to distinguish between numbers with/without a dot attached:
> >
> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
> re.compile(r'ch \d{1,}[.]').findall(text)
> > ['ch 1.', 'ch 23.']
Il 06/08/2021 16:17, jak ha scritto:
Il 06/08/2021 12:57, Jach Feng ha scritto:
jak 在 2021年8月6日 星期五下午4:10:05 [UTC+8] 的信中寫道:
Il 05/08/2021 11:40, Jach Feng ha scritto:
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compi
ast 在 2021年8月5日 星期四下午11:29:15 [UTC+8] 的信中寫道:
> Le 05/08/2021 à 17:11, ast a écrit :
> > Le 05/08/2021 à 11:40, Jach Feng a écrit :
> >> I want to distinguish between numbers with/without a dot attached:
> >>
> > text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
> > re.compile(r'ch \d{1,
Il 05/08/2021 11:40, Jach Feng ha scritto:
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
['ch 1.', 'ch 23.']
re.compile(r'ch \d{1,}[^.]').findall(text)
['ch 23', 'ch 4 ', 'ch 56 '
Le 06/08/2021 à 02:57, Jach Feng a écrit :
ast 在 2021年8月5日 星期四下午11:29:15 [UTC+8] 的信中寫道:
Le 05/08/2021 à 17:11, ast a écrit :
Le 05/08/2021 à 11:40, Jach Feng a écrit :
import regex
# regex is more powerful that re
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
regex.findall(r'ch \d++(?!
Le 05/08/2021 à 17:11, ast a écrit :
Le 05/08/2021 à 11:40, Jach Feng a écrit :
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
['ch 1.', 'ch 23.']
re.compile(r'ch \d{1,}[^.]').find
Le 05/08/2021 à 17:11, ast a écrit :
Le 05/08/2021 à 11:40, Jach Feng a écrit :
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
['ch 1.', 'ch 23.']
re.compile(r'ch \d{1,}[^.]').find
On Thu, 5 Aug 2021 02:40:30 -0700 (PDT), Jach Feng wrote:
I want to distinguish between numbers with/without a dot attached:
>>> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
>>> re.compile(r'ch \d{1,}[.]').findall(text)
['ch 1.', 'ch 23.']
>>> re.compile(r'ch \d{1,}[^.]').findall(tex
Le 05/08/2021 à 11:40, Jach Feng a écrit :
I want to distinguish between numbers with/without a dot attached:
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
['ch 1.', 'ch 23.']
re.compile(r'ch \d{1,}[^.]').findall(text)
['ch 23', 'ch 4 ', 'ch 56 '
Jach Feng wrote:
> I want to distinguish between numbers with/without a dot attached:
>
text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
re.compile(r'ch \d{1,}[.]').findall(text)
> ['ch 1.', 'ch 23.']
re.compile(r'ch \d{1,}[^.]').findall(text)
> ['ch 23', 'ch 4 ', 'ch 56 ']
>
> I
Neil 在 2021年8月5日 星期四下午6:36:58 [UTC+8] 的信中寫道:
> Jach Feng wrote:
> > I want to distinguish between numbers with/without a dot attached:
> >
> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
> re.compile(r'ch \d{1,}[.]').findall(text)
> > ['ch 1.', 'ch 23.']
> re.compile(r'ch
I want to distinguish between numbers with/without a dot attached:
>>> text = 'ch 1. is\nch 23. is\nch 4 is\nch 56 is\n'
>>> re.compile(r'ch \d{1,}[.]').findall(text)
['ch 1.', 'ch 23.']
>>> re.compile(r'ch \d{1,}[^.]').findall(text)
['ch 23', 'ch 4 ', 'ch 56 ']
I can guess why the 'ch 23' appear
17 matches
Mail list logo