$a = /sdfsd/||/abc/||/def/||/hijk/; $b = /qqqq/||/ff/||/wqeoir/; if ($a) {...}