M
M
MagNet2012-08-02 11:55:01
Python
MagNet, 2012-08-02 11:55:01

Help with regular expression

I'm sorting out the base of the cladder, in particular, I need to get the case number from the records:
39/43k1str3
34kB
(it can be not only a number, but also a symbol) I
started doing it:
к([\d\.\W]+)стр{0,1}but it only finds records with the structure, in general, can anyone solve such a problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim, 2012-08-02
@MagNet

k(.+?)(str)?

C
ComputerPers, 2012-08-02
@ComputerPers

k([\d\w]).*$

U
Unixspv, 2012-08-02
@Unixspv

k([0-9A-Z]+) - right?
In general, there are few examples, it is difficult to understand what exactly is needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question