Issue #3414568 by dimitriskr, smustgrave, quietone: Replace preg_match() with str_starts_with()/str_ends_with() or similar