I am writing a fast PHP parser here and wondered instead of writing
foreach($array as $line) { if(preg_match($regex1, ..) { } elseif(preg_match($regex2, ..) { } }
Is it possible to match an array of regular expression arrays?
foreach($text_array as $line){ foreach($regex_array as $regex{ ... } }
Source: https://habr.com/ru/post/1765526/More articles:Delete duplicates in a large table MySql - sqlLINQ to Object compares two lists of integers for different values - c #Convert MongoDB BSON ObjectId (oid) to generated time in Objective-C? - objective-cCImg Python 3 bindings or something at least comparable? - pythonsetApplicationIconBadgeNumber does not refresh the icon several times when called - iphoneОбновить значения для UILabel, помещенной в заголовок раздела UITableViews - iphoneDjango Development Server Output Configuration - djangoSharing Zend helpers (view or action) Between modules - phpIs there an equivalent initialization list for members in PHP? - initializationClosing an anonymous delegate (or why does this work)? - c #All Articles