$re = '/(.+):\s*TextConst\s*ENU\s*=\s*\'(.*)\',\s*ENG\s=\s\'(.*)\';/m';
$str = 'Regular Expression No.1 --> (.+):\\s*TextConst\\s*ENU\\s*=\\s*\'(.*)\',\\s*ENG\\s=\\s\'(.*)\';
------------------------------------------------------------------------------------
TxtLineText: TextConst ENU = \'Line %1: \', ENG = \'Line %1: \';
TxtNoLinesToProcess: TextConst ENU = \'There are no lines to process\', ENG = \'There are no lines to process\';
Regular Expression No.2 --> (.+):\\s*TextConst\\s*ENU\\s*=\'(.*)\'\\s*,\\s*ENG=\'(.*)\'\\s*;
-----------------------------------------------------------------------------------
TxtPurchaseWorksheetNosCode : TextConst ENU=\'PURCH WKSH\',ENG=\'PURCH WKSH\';
TxtPurchaseWorksheetNosDescription : TextConst ENU=\'Purchase Worksheet\',ENG=\'Purchase Worksheet\';
TxtPurchaseWorksheetNosStartingNo : TextConst ENU=\'PW000001\',ENG=\'PW000001\';
TxtSalesWorksheetNosCode : TextConst ENU=\'SALES WKSH\',ENG=\'SALES WKSH\';
TxtSalesWorksheetNosDescription : TextConst ENU=\'Sales Worksheet\',ENG=\'Sales Worksheet\';
TxtSalesWorksheetNosStartingNo : TextConst ENU=\'SW000001\',ENG=\'SW000001\';';
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