Updated
Given a string:
108[\t]уп[\t][\t][\t][\t]УпtакSЁовка[\t][\t]0</nыЪ>
The same, but in the form of a table with the division by the tab character [\ t]:
+---+--+-+-+-+-----------+-+-+ |108|уп|-|-|-|УпtакSЁовка|-|0| +---+--+-+-+-+-----------+-+-+
"-" is an empty value.
Desired value capture scheme:
{108}[\t]{уп}[\t]{-}[\t]{-}[\t]{-}[\t]{УпtакSЁовка}[\t]{-}[\t]{0}</nыЪ>
{*} - what we want to capture
[\ t] - tab character
"-" - empty value
Using regular expressions can not capture the "emptiness".
To somehow get out of this situation, we will capture the tab character before the empty value.
The final capture scheme:
{108}[\t]{уп}{[\t]}-{[\t]}-{[\t]}-[\t]{УпtакSЁовка}{[\t]}-[\t]{0}</nыЪ>
Regular expression:
@[а-яА-ЯёЁ0-9a-zA-Z]+(?=\t|<)|\t(?=\t)@
Explanation:
/* * [а-яА-ЯёЁ0-9a-zA-Z]+(?=\t|<) - комбинация из русских букв, латинских букв и цифр, * после которой есть символ табуляции, или "<" * * \t(?=\t) - символ табуляции, сразу за которым есть еще один */
Result:
/* * 1 : 108 * 2 : уп * 3 : [\t] * 4 : [\t] * 5 : [\t] * 6 : УпtакSЁовка * 7 : [\t] * 8 : 0 */