These are regular expressions. Based on your questions, it sounds like you need more than just a few sentences of summary, so I’ll refer you instead to PHP’s documentation on this subject.
Jeff is entirely correct in that if you’re starting to dig into regex you should spend some time to learn fully what they mean. However, to answer your immediate inquiries…
is used here as an indicator to say “0 or more”.
the . means “any character”.
so, this regular expression is read to be: Any number of characters, followed by an h, followed by any number of characters, followed by an e (etc, etc)
what does | means here? is it OR I thought php or was ||
and what does that + sign do at the end?
|| is OR in php. But regex syntax is not PHP. | means OR in PCRE.
the +, again, is a numeric quantifier, meaning “1 or more”.
() are used to designate subpatterns.
so this regular expression reads:
“Either ‘111111’ or ‘000000’, followed by any number of instances of either ‘111111’ or ‘000000’.”