Regex problem, extract data, help

hi, sorry for my bad English,
currently, I extracting dialogue from an old game(350MB)
after some time I succeed decode: how string data is saved,
for example

00=A
01=B

19=Z
20=a

because it is hard to distinguish between dialogue data and raw data, I put the mark like this:

00=[A]
01=[B]

the result is like this:

[T][h][i][s][D][a][t][a]

then i remove the “][” and add a new line after “]” and before “[”,
so it became like this:

[This Data]		    //<=data
БбВвГгДдЕеЁёЖжЗз]	//<=junk because do not start with [
ИиЙйКкЛлМмНнОоПп	//<=junk because do not start with [, and end with ]
[РрСсТтУуФфХхЦцЧч	//<=junk because do not end with ]
[This data too]		//<=data

as you can see, I have 3 kinds of junk(lines 2,3 and 4),
at this point I like to know, is there any regex to remove that junk lines?,
please help!!

Sounds a little bit like a XY problem to me. :wink:

How about to share the raw input, the expected output and what you have tried so far? There might be a better way of getting the results you want including avoiding to get the junk just you showed. :wink:

thanks for reply, i will not upload it, i afraid i get banned,
it a PS1/PSX Game called “harvest moon : back to nature” with ID: SLUS_01115,

and this link how i get the data :https://translate.google.com/translate?&sl=vi&tl=en&u=https%3A%2F%2Fgametiengviet.com%2Fthreads%2Fhuong-dan-viet-hoa-harvest-moon-back-to-nature.1626%2F

just for info, i just need the dialogue text,
thanks again for the reply

Something like this?

PS E:\Temp> Select-String -Path E:\Temp\Files\dialog.txt -Pattern '^\[.+\]$' | Select-Object -ExpandProperty Line
[This Data]
[This data too]
1 Like

sorry for the late reply, I just come home and the raw data is 350MB so it takes time, combines with I do not add “Set-Content”, so I run it twice

thank you a lot, your code is working, thank you again