K
K
kevus2018-08-24 16:24:19
Regular Expressions
kevus, 2018-08-24 16:24:19

How to choose such a regular?

Hello. There is a text:

HELICOPTER BATTERY RU 33008 24PCS 4 IN PLASTIC BOX 281012CM

What should be the regular season to pull out 33008?
Naturally, text options are always random, like 33008.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nick Sdk, 2018-08-24
@lidacriss

probably like this
/\s(\d+)\s/

A
Alexander Pushkarev, 2018-08-24
@AXP-dev

/\s\d{0,5}\s/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question