preg_match( $pattern, $subject, $matches, , )
Searches subject for all matches to the regular expression given in pattern and puts them in matches in the order specified by flags. After the first match is found, the subsequent searches are continued on from end of the last match. Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred.
function $pattern $subject $matches
preg_match #<[a-z]+>\w</[a-z]+># <div>sdsdsdsdsdsd</div> array (
  0 => 
  array (
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) - ([A-Z '\.]+)-([A-Z '\.]+) on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M)[\s\n]+New M-PESA balance is Tsh([0-9\.\,]+)/mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00.',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
    4 => 'CRDB',
    5 => 'BANK',
    6 => '20/12/17',
    7 => '1:34 PM',
    8 => '14,704.00.',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) - ([A-Z '\.]+)-([A-Z '\.]+) on (\d\d?\/\d\d?\/\d\d)/mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
    4 => 'CRDB',
    5 => 'BANK',
    6 => '20/12/17',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) - ([A-Z '\.]+)-([A-Z '\.]+)/mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on ',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
    4 => 'CRDB',
    5 => 'BANK on ',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) - ([A-Z '\.]+)/mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
    4 => 'CRDB',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) /mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 ',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+)/mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh/mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh',
    1 => '4LK011T8G9Q',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh1',
    1 => '4LK011T8G9Q',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) - .+ on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00.',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
    4 => '20/12/17',
    5 => '1:34 PM',
    6 => '14,704.00',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([A-Z0-9]+) - .+ on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00.',
    1 => '4LK011T8G9Q',
    2 => '10,000.00',
    3 => '393535',
    4 => '20/12/17',
    5 => '1:34 PM',
    6 => '14,704.00',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from .+ - .+ on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00.',
  ),
  1 => 
  array (
    0 => '4LK011T8G9Q',
  ),
  2 => 
  array (
    0 => '10,000.00',
  ),
  3 => 
  array (
    0 => '20/12/17',
  ),
  4 => 
  array (
    0 => '1:34 PM',
  ),
  5 => 
  array (
    0 => '14,704.00',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([A-Z '\.]+) on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
  ),
  1 => 
  array (
  ),
  2 => 
  array (
  ),
  3 => 
  array (
  ),
  4 => 
  array (
  ),
  5 => 
  array (
  ),
  6 => 
  array (
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from ([0-9]+) - ([A-Z '\.]+) on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
  ),
  1 => 
  array (
  ),
  2 => 
  array (
  ),
  3 => 
  array (
  ),
  4 => 
  array (
  ),
  5 => 
  array (
  ),
  6 => 
  array (
  ),
  7 => 
  array (
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from .+ on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./mi 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00.',
  ),
  1 => 
  array (
    0 => '4LK011T8G9Q',
  ),
  2 => 
  array (
    0 => '10,000.00',
  ),
  3 => 
  array (
    0 => '20/12/17',
  ),
  4 => 
  array (
    0 => '1:34 PM',
  ),
  5 => 
  array (
    0 => '14,704.00',
  ),
)
preg_match /([A-Z0-9]+) Confirmed.You have received Tsh([0-9\.\,]+) from .+ on (\d\d?\/\d\d?\/\d\d) at (\d\d?:\d\d [AP]M) New M-Pesa balance is Tsh([0-9\.\,]+)\./ 4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00. array (
  0 => 
  array (
    0 => '4LK011T8G9Q Confirmed.You have received Tsh10,000.00 from 393535 - CRDB-BANK on 20/12/17 at 1:34 PM New M-Pesa balance is Tsh14,704.00.',
  ),
  1 => 
  array (
    0 => '4LK011T8G9Q',
  ),
  2 => 
  array (
    0 => '10,000.00',
  ),
  3 => 
  array (
    0 => '20/12/17',
  ),
  4 => 
  array (
    0 => '1:34 PM',
  ),
  5 => 
  array (
    0 => '14,704.00',
  ),
)
preg_match /Transfer Successful. New balance is TSh ([0-9\.\,]+). You have received TSh ([0-9\.\,]+) from .+, with TxnId: (.+)\. (\d\d?\/\d\d?\/\d\d \d\d?:\d\d)./ Transfer Successful. New balance is TSh 1,109. You have received TSh 100 from M-PESA, with TxnId: 69468491613. 4LI911PD7W5. 18/12/17 23:36. array (
  0 => 
  array (
    0 => 'Transfer Successful. New balance is TSh 1,109. You have received TSh 100 from M-PESA, with TxnId: 69468491613. 4LI911PD7W5. 18/12/17 23:36.',
  ),
  1 => 
  array (
    0 => '1,109',
  ),
  2 => 
  array (
    0 => '100',
  ),
  3 => 
  array (
    0 => '69468491613. 4LI911PD7W5',
  ),
  4 => 
  array (
    0 => '18/12/17 23:36',
  ),
)
preg_match /(A|C|D|M|T|R)[0-9]{0,4}\s{1,7}(.+)?:\s{0,7}(.*)/m D tma/x86/MLS/common/clean/clean_backupfolder.bat M tma/x86/MLS/common/launch_interface.bat D tma/x86/MLS/common/replication/primary_server_start_backup.bat M tma/x86/MLS/fid_custom/CARREFOUR_BRAZIL/init/MapProcessFiller_FID_CARREFOUR_BRAZIL.php M tma/x86/MLS/fid_custom/CARREFOUR_CHINA/init/MapProcessFiller_FID_CARREFOUR_CHINA.php M tma/x86/MLS/fid_tma/init/MapProcessFiller_FID.php D tma/x86/MTS/common/clean/clean_backupfolder.bat R097 tma/x86/MTS/histo_custom/CARREFOUR_BRAZIL/SchTasks/Export_PRM.bat tma/x86/MTS/histo_tma/schtasks/Export_PRM.bat array (
  0 => 
  array (
  ),
  1 => 
  array (
  ),
  2 => 
  array (
  ),
  3 => 
  array (
  ),
)
preg_match /(A|C|D|M|T|R)[0-9]{0,4}\s{1,7}(.+)?:.*/m D tma/x86/MLS/common/clean/clean_backupfolder.bat M tma/x86/MLS/common/launch_interface.bat D tma/x86/MLS/common/replication/primary_server_start_backup.bat M tma/x86/MLS/fid_custom/CARREFOUR_BRAZIL/init/MapProcessFiller_FID_CARREFOUR_BRAZIL.php M tma/x86/MLS/fid_custom/CARREFOUR_CHINA/init/MapProcessFiller_FID_CARREFOUR_CHINA.php M tma/x86/MLS/fid_tma/init/MapProcessFiller_FID.php D tma/x86/MTS/common/clean/clean_backupfolder.bat R097 tma/x86/MTS/histo_custom/CARREFOUR_BRAZIL/SchTasks/Export_PRM.bat tma/x86/MTS/histo_tma/schtasks/Export_PRM.bat array (
  0 => 
  array (
  ),
  1 => 
  array (
  ),
  2 => 
  array (
  ),
)
preg_match /(A|C|D|M|T|R)[0-9]{0,4}\s{1,7}(.+)?:\s.*/m D tma/x86/MLS/common/clean/clean_backupfolder.bat M tma/x86/MLS/common/launch_interface.bat D tma/x86/MLS/common/replication/primary_server_start_backup.bat M tma/x86/MLS/fid_custom/CARREFOUR_BRAZIL/init/MapProcessFiller_FID_CARREFOUR_BRAZIL.php M tma/x86/MLS/fid_custom/CARREFOUR_CHINA/init/MapProcessFiller_FID_CARREFOUR_CHINA.php M tma/x86/MLS/fid_tma/init/MapProcessFiller_FID.php D tma/x86/MTS/common/clean/clean_backupfolder.bat R097 tma/x86/MTS/histo_custom/CARREFOUR_BRAZIL/SchTasks/Export_PRM.bat tma/x86/MTS/histo_tma/schtasks/Export_PRM.bat array (
  0 => 
  array (
  ),
  1 => 
  array (
  ),
  2 => 
  array (
  ),
)