I have some text
1 fgj sel dfjkd prm jfkdl frm jkl tbl klk
2 ledk prm jkl jkk frm jkl tbl jkl fjj
3 jklj sel prm kljlk jkjkl jkkl tbl emel
4 rui jkljl sel jklj jklj prm jkjl
5 jljkj frm jkljl jlj tbl mjljlk
I need the block that starts with "sel" and ends with "tbl". And this block contains two words "prm" and "frm". That is, the block consists of the sequence of words "sel" "prm" "frm" "tbl" And the correct answer should be (part of the first line, part of the fourth and fifth line)
sel dfjkd prm jfkdl frm jkl tbl
sel jklj jklj prm jkjl
5 jljkj frm jkljl jlj tbl
I tried, but it does not work for me
(sel)*?(prm|frm)?*(tbl)
or so
\bsel\b.*?\bprm\b.*?\bfrm\b.*?\btbl\b