I have got working regex
$this->html
- HTML data
$cssPattern = '/<link rel="stylesheet".*?href="(.+?)"\\s*?\/?>/si';
preg_match_all("{$cssPattern}", $this->html, $matches);
These regex work if rel="stylesheet" is before href but as I mention there is situations where it is after href and in these situation these regex do not work. Is it possible to make / check if rel="stylesheet" is before href or after href