Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
<link(?=[^<>]*?opensearch)(?:[^h]+|h(?!ref))*+href=["']?\K([^<>'"\s]+(?:\/(?!>)|\b))(?=[^<>]*>)
/
igmx

Description

Find the location (HREF value) of the Open Search Description link tag.

Submitted by Evander Consus - 8 years ago