$re = '/(?<record_code>11)(?<bank_code>[0-9]{4})(?<branch_code>[0-9]{4})(?<account_number>[0-9]{10})(?<start_date>[0-9]{6})(?<end_date>[0-9]{6})(?<initial_balance_code>[1-2]{1})(?<initial_balance_amount>[0-9]{14})(?<currency_code>[0-9]{3})(?<information_mode_code>[1-3]{1})(?<abbreviated_name>[a-z A-Z0-9]{26})(?<client_code>[0-9 ]{3})/m';
$str = '111234222212345678900102180202182000000002000009783MI EMPRESA SL 099 2212342222010218010218011112000000000100500000000000ORDEN PAGO RECIB
2212342222010218010218011112000000000050250000000000ORDEN PAGO RECIB
2301LIQ. OP. N 000000000000069
2302AUTOMOCION LAGUNA SL 41001 SEVILLA ES
3312342222123456789000000000000000000000000200000000015075200000000215075978
88999999999999999999000006
110182241902008000281701311701311000019193174009783CARLOS BANANERO RUIZ
2201822419170131170130028972000000000551180000000000ABONO COMP. TRU 30/1/2017
2201822419170131170130021731000000000003500000000000LIQUID.ABONO COM
2301012419-003002935-1
2201822419170131170130041222000000000003502419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170130041221000000000551182419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170131028972000000000900600000000000ABONO COMP. TRU 31/1/2017
2201822419170131170131028972000000004984460000000000ABONO COMP. TRU 31/1/2017
2201822419170131170131041221000000000900602419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170131041221000000004984462419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170201028972000000001041250000000000ABONO COMP. TRU 30/1/2017
2201822419170131170201028972000000001191960000000000ABONO COMP. TRU 30/1/2017
2201822419170131170201021731000000000007000000000000LIQUID.ABONO COM
2301012419-003002933-8
2201822419170131170201021731000000000016500000000000LIQUID.ABONO COM
2301012419-003002934-0
2201822419170131170201041222000000000007002419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170201041222000000000016502419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170201041221000000001191962419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170201041221000000001041252419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170202028972000000007865630000000000ABONO COMP. TRU 31/1/2017
2201822419170131170202028972000000008973270000000000ABONO COMP. TRU 31/1/2017
2201822419170131170202041221000000007865632419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
2201822419170131170202041221000000008973272419080002TRASPASO MOVTOS.
2301TRASP. DST: 1128-020-0156824
3301822419020080002800010000000025535350001000000002553535100001919317400978
88999999999999999999000035
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php