Key held down regex

PHOTO EMBED

Sat Mar 27 2021 11:46:04 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user] #php #regex

preg_match('/(.)\\1{4,}/', $text)
content_copyCOPY

Looking for any character, try to find 4 matches at that exact character after it (): it will be included as a match \1: Refer to that match