I've below text, how can I extract list
[83472, 8327489] and abcd: 32324 ?
[83472, 8327489]abcd: 32324Expr bla bla
[243fd]abcd: 4342Expr ieddsk
[2324, 34543, 8937423]abcd: 3232432423423Expr bla bla
sed -E 's/(\[[^]]*\]abcd:[[:blank:]]*[[:digit:]]*).*/\1/' file
should do it.
Sample Output
[83472, 8327489]abcd: 32324
[243fd]abcd: 4342
[2324, 34543, 8937423]abcd: 3232432423423
sed -E 's/Expr.*//' file ?
[Expr. 8327489] abcd: 32324Expr bla bla
With grep and pcre
1) to extract upto but not including Expr and rest of line
$ grep -oP '.*(?=Expr)' file
[83472, 8327489]abcd: 32324
[243fd]abcd: 4342
[2324, 34543, 8937423]abcd: 3232432423423
2) to extract [...]abcd: numbers
$ grep -oP '\[[^]]*\]abcd:\s*\d+' file
[83472, 8327489]abcd: 32324
[243fd]abcd: 4342
[2324, 34543, 8937423]abcd: 3232432423423