Hello, help to make regular. There is a line, if in a line, for example, there is 453 | 571 then take everything up to "" (space)
var str = '461|572|0|4|29|29|7809169 453|571|0|2|66|66|7809053 446|565|0|4|41|41|7809052'; if(str.indexOf('453|571')>=0){ var res = str.match('регулярочка'); console.log('453|571|0|2|66|66|7809053'); }
(^| )([^ ]*453[|]571[^ ]*)($| )- Akina