Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Non-capturing group
    (?:...)
  • Capturing group
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression

/
/
gm

Test String

Code Generator

Generated Code

$re = '/<item>.*?<link>(((?!<\/link>).)*?)<\/link>((?!<link>).)*?<category>(Analysis|Politics|US|Editorial|Opinion)<\/category>.*?<\/item>/m'; $str = '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > <channel> <title>The Daily Caller</title> <atom:link href="https://dailycaller.com/feed/" rel="self" type="application/rss+xml" /> <link>https://dailycaller.com</link> <description>The Daily Caller features breaking news, opinion, research, and entertainment 24 hours a day.</description> <lastBuildDate> Fri, 10 Jan 2020 22:23:39 +0000 </lastBuildDate> <language>en-US</language> <sy:updatePeriod> hourly </sy:updatePeriod> <sy:updateFrequency> 1 </sy:updateFrequency> <image> <url>https://dailycaller.com/wp-content/uploads/2019/07/favicon.ico</url> <title>The Daily Caller</title> <link>https://dailycaller.com</link> <width>32</width> <height>32</height> </image> <item> <title>To Win The 21st Century, It&#8217;s Time For A Detente Between The Government And Big Tech</title> <link>https://dailycaller.com/2020/01/10/government-big-tech/</link> <comments>https://dailycaller.com/2020/01/10/government-big-tech/#respond</comments> <pubDate>Fri, 10 Jan 2020 22:14:03 +0000</pubDate> <dc:creator><![CDATA[Ryan Khurana]]></dc:creator> <category><![CDATA[American Renewal]]></category> <category><![CDATA[DC Exclusives - Opinion]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[Matt Stoller]]></category> <category><![CDATA[National Quantum Initiative]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821960</guid> <description><![CDATA[The competitiveness of the US technology industry is a national security issue]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/government-big-tech/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>American Renewal</category><category></category> </item> <item> <title>Nancy Pelosi Is Giving Joe Biden A Leg Up Before Iowa</title> <link>https://dailycaller.com/2020/01/10/nancy-pelosi-impeachment-senators-iowa/</link> <comments>https://dailycaller.com/2020/01/10/nancy-pelosi-impeachment-senators-iowa/#respond</comments> <pubDate>Fri, 10 Jan 2020 22:01:22 +0000</pubDate> <dc:creator><![CDATA[Peter Hasson]]></dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[Elections 2020]]></category> <category><![CDATA[Joe Biden]]></category> <category><![CDATA[Nancy Pelosi]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821853</guid> <description><![CDATA[\'Of course it matters\']]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/nancy-pelosi-impeachment-senators-iowa/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Analysis</category><category></category> </item> <item> <title>Hunter Biden May Be Profitting Off A Brutal Chinese-Owned Mine In Africa</title> <link>https://dailycaller.com/2020/01/10/hunter-biden-profitting-brutal-chinese-owned-mine-africa/</link> <comments>https://dailycaller.com/2020/01/10/hunter-biden-profitting-brutal-chinese-owned-mine-africa/#respond</comments> <pubDate>Fri, 10 Jan 2020 21:44:25 +0000</pubDate> <dc:creator><![CDATA[Hayden Daniel]]></dc:creator> <category><![CDATA[DC Exclusives]]></category> <category><![CDATA[DC Exclusives - Original Reporting]]></category> <category><![CDATA[Premium Content]]></category> <category><![CDATA[Burisma]]></category> <category><![CDATA[China]]></category> <category><![CDATA[Democratic Republic of the Congo]]></category> <category><![CDATA[Hunter Biden]]></category> <category><![CDATA[Joe Biden]]></category> <category><![CDATA[Patriots Only]]></category> <category><![CDATA[Ukraine]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821973</guid> <description><![CDATA[It is the largest cobalt-producing mine in the Congo]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/hunter-biden-profitting-brutal-chinese-owned-mine-africa/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>World</category><category></category> </item> <item> <title>Joaquin Phoenix Says He &#8216;Flew Plane Out&#8217; To DC To Join &#8216;Fight&#8217; Against Climate Change</title> <link>https://dailycaller.com/2020/01/10/joaquin-phoenix-flew-plane-dc-climate-change-fight/</link> <comments>https://dailycaller.com/2020/01/10/joaquin-phoenix-flew-plane-dc-climate-change-fight/#respond</comments> <pubDate>Fri, 10 Jan 2020 21:37:14 +0000</pubDate> <dc:creator><![CDATA[Katie Jerkovich]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Climate change]]></category> <category><![CDATA[Jane Fonda]]></category> <category><![CDATA[Joaquin Phoenix]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6822087</guid> <description><![CDATA[Oh boy]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/joaquin-phoenix-flew-plane-dc-climate-change-fight/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Entertainment</category><category></category> </item> <item> <title>Iran May Have A Squadron Of Russian-Trained Military Dolphins</title> <link>https://dailycaller.com/2020/01/10/iran-squadron-russian-killer-dolphins/</link> <comments>https://dailycaller.com/2020/01/10/iran-squadron-russian-killer-dolphins/#respond</comments> <pubDate>Fri, 10 Jan 2020 21:27:52 +0000</pubDate> <dc:creator><![CDATA[Jordan Lancaster]]></dc:creator> <category><![CDATA[DC Exclusives]]></category> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[America]]></category> <category><![CDATA[Dolphins]]></category> <category><![CDATA[Iran]]></category> <category><![CDATA[Russia]]></category> <category><![CDATA[Soviet Union]]></category> <category><![CDATA[War]]></category> <category><![CDATA[weapons]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6822006</guid> <description><![CDATA[They were trained to perform kamikaze attacks]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/iran-squadron-russian-killer-dolphins/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>World</category><category></category> </item> <item> <title>FACT CHECK: Did Kevin McCarthy Say Trump Killed Qasem Soleimani &#8216;Because Adam Schiff &#8220;Spent The Last Year On Impeachment&#8221;&#8216;?</title> <link>http://checkyourfact.com/2020/01/10/fact-check-kevin-mccarthy-trump-qasem-soleimani-raw-story-adam-schiff-impeachment/</link> <comments>http://checkyourfact.com/2020/01/10/fact-check-kevin-mccarthy-trump-qasem-soleimani-raw-story-adam-schiff-impeachment/#respond</comments> <pubDate>Fri, 10 Jan 2020 21:06:52 +0000</pubDate> <dc:creator><![CDATA[Elias Atienza]]></dc:creator> <category><![CDATA[Check Your Fact]]></category> <category><![CDATA[DC Exclusives - Original Reporting]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[Kevin McCarthy]]></category> <category><![CDATA[Qassem Soleimani]]></category> <category><![CDATA[The Raw Story]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6819979</guid> <description><![CDATA[\'Oh, c\'mon\']]></description> <wfw:commentRss>http://checkyourfact.com/2020/01/10/fact-check-kevin-mccarthy-trump-qasem-soleimani-raw-story-adam-schiff-impeachment/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Politics</category><category></category> </item> <item> <title>Nancy Pelosi Named In Top 50 Bada** Women Of 2020, Offers Her &#8216;Best Bada** Advice&#8217;</title> <link>https://dailycaller.com/2020/01/10/nancy-pelosi-top-50-women-of-2020/</link> <comments>https://dailycaller.com/2020/01/10/nancy-pelosi-top-50-women-of-2020/#respond</comments> <pubDate>Fri, 10 Jan 2020 21:06:50 +0000</pubDate> <dc:creator><![CDATA[Katie Jerkovich]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[InStyle magazine]]></category> <category><![CDATA[Nancy Pelosi]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6822030</guid> <description><![CDATA[\'That is what is necessary\']]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/nancy-pelosi-top-50-women-of-2020/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Entertainment</category><category></category> </item> <item> <title>House Democrats Vote Against Recognizing Unborn Babies As &#8216;Vulnerable Populations&#8217;</title> <link>https://dailycaller.com/2020/01/10/mccarthy-democrats-vote-unborn-children/</link> <comments>https://dailycaller.com/2020/01/10/mccarthy-democrats-vote-unborn-children/#respond</comments> <pubDate>Fri, 10 Jan 2020 21:00:36 +0000</pubDate> <dc:creator><![CDATA[Mary Margaret Olohan]]></dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[Democrats]]></category> <category><![CDATA[Kevin McCarthy]]></category> <category><![CDATA[Roe v. Wade]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821947</guid> <description><![CDATA[\'denying the science of the development of a child in the womb\']]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/mccarthy-democrats-vote-unborn-children/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Daily Caller News Foundation</category><category></category> </item> <item> <title>Donald Trump Weighs In On Prince Harry, Meghan Markle&#8217;s Decision To &#8216;Step Back&#8217;</title> <link>https://dailycaller.com/2020/01/10/donald-trump-prince-harry-meghan-markles-to-step-back/</link> <comments>https://dailycaller.com/2020/01/10/donald-trump-prince-harry-meghan-markles-to-step-back/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:57:22 +0000</pubDate> <dc:creator><![CDATA[Lauryn Overhultz]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[Meghan Markle]]></category> <category><![CDATA[Prince Harry]]></category> <category><![CDATA[Queen Elizabeth II]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6822017</guid> <description><![CDATA[\'I just have such respect for the Queen\']]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/donald-trump-prince-harry-meghan-markles-to-step-back/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Entertainment</category><category></category> </item> <item> <title>Patriots Impeachment Weekly Wrap-Up: Pelosi Buckles</title> <link>https://dailycaller.com/2020/01/10/patriots-impeachment-wrap-up-week-11/</link> <comments>https://dailycaller.com/2020/01/10/patriots-impeachment-wrap-up-week-11/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:54:25 +0000</pubDate> <dc:creator><![CDATA[Virginia Kruta]]></dc:creator> <category><![CDATA[DC Exclusives - Original Reporting]]></category> <category><![CDATA[Premium Content]]></category> <category><![CDATA[Adam Schiff]]></category> <category><![CDATA[Articles of Impeachment]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[impeachment]]></category> <category><![CDATA[Josh Hawley]]></category> <category><![CDATA[Nancy Pelosi]]></category> <category><![CDATA[Patriots Only]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821897</guid> <description><![CDATA[\'The House Democrats’ turn is over\']]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/patriots-impeachment-wrap-up-week-11/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Politics</category><category></category> </item> <item> <title>Trump Says He Will Use Executive Privilege To Prevent John Bolton Testimony</title> <link>https://dailycaller.com/2020/01/10/trump-executive-privilege-john-bolton-testimony/</link> <comments>https://dailycaller.com/2020/01/10/trump-executive-privilege-john-bolton-testimony/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:51:25 +0000</pubDate> <dc:creator><![CDATA[Justin Caruso]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[impeachment]]></category> <category><![CDATA[John Bolton]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821958</guid> <description><![CDATA[Big development.]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/trump-executive-privilege-john-bolton-testimony/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Politics</category><category></category> </item> <item> <title>Hannah Ferguson Torches Internet With Jaw-Dropping Topless Shot</title> <link>http://smokeroom.com/2020/01/10/hannah-ferguson-drops-topless-shot/</link> <comments>http://smokeroom.com/2020/01/10/hannah-ferguson-drops-topless-shot/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:40:45 +0000</pubDate> <dc:creator><![CDATA[Katie Jerkovich]]></dc:creator> <category><![CDATA[Smoke Room]]></category> <category><![CDATA[Hannah Ferguson]]></category> <category><![CDATA[Sports Illustrated Swimsuit]]></category> <category><![CDATA[Victoria\'s Secret]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821845</guid> <description><![CDATA[Oh my]]></description> <wfw:commentRss>http://smokeroom.com/2020/01/10/hannah-ferguson-drops-topless-shot/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>None</category><category></category> </item> <item> <title>Florida Man Gets 90 Days In Prison For Spitting On 67-Year-Old Man Wearing MAGA Hat</title> <link>https://dailycaller.com/2020/01/10/florida-man-prison-spitting-maga-hat/</link> <comments>https://dailycaller.com/2020/01/10/florida-man-prison-spitting-maga-hat/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:40:32 +0000</pubDate> <dc:creator><![CDATA[Shelby Talcott]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[Florida]]></category> <category><![CDATA[Make America Great Again]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821981</guid> <description><![CDATA[The man was also ordered to pay money and stay away from the victim]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/florida-man-prison-spitting-maga-hat/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>US</category><category></category> </item> <item> <title>Video Of US Firefighters Receiving Hero&#8217;s Welcome In Australia To Help Battle Fires Will Make You Cheer</title> <link>https://dailycaller.com/2020/01/10/us-firefighters-receiving-heros-welcome-australia/</link> <comments>https://dailycaller.com/2020/01/10/us-firefighters-receiving-heros-welcome-australia/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:32:57 +0000</pubDate> <dc:creator><![CDATA[Katie Jerkovich]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Australia]]></category> <category><![CDATA[brush fire]]></category> <category><![CDATA[Firefighters]]></category> <category><![CDATA[United States]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821931</guid> <description><![CDATA[America at its finest!]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/us-firefighters-receiving-heros-welcome-australia/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>US</category><category></category> </item> <item> <title>Daniel Radcliffe Was Once Mistaken For A Homeless Man In New York City</title> <link>https://dailycaller.com/2020/01/10/daniel-radcliffe-homeless-man-new-york-city/</link> <comments>https://dailycaller.com/2020/01/10/daniel-radcliffe-homeless-man-new-york-city/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:31:36 +0000</pubDate> <dc:creator><![CDATA[Lauryn Overhultz]]></dc:creator> <category><![CDATA[DC Exclusives - Opinion]]></category> <category><![CDATA[Smoke Room]]></category> <category><![CDATA[Smoke Room Cross Post]]></category> <category><![CDATA[Daniel Radcliffe]]></category> <category><![CDATA[Homeless]]></category> <category><![CDATA[New York City]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821943</guid> <description><![CDATA[\'Apparently, I need to shave more often\']]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/daniel-radcliffe-homeless-man-new-york-city/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Editorial</category><category></category> </item> <item> <title>MARTIN: From Lois Lerner To The FBI, Bureaucrats Blame &#8216;Incompetence&#8217; When They Target Conservatives</title> <link>https://dailycaller.com/2020/01/10/martin-bureaucrats-incompetence/</link> <comments>https://dailycaller.com/2020/01/10/martin-bureaucrats-incompetence/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:30:00 +0000</pubDate> <dc:creator><![CDATA[Jenny Beth Martin]]></dc:creator> <category><![CDATA[DC Exclusives - Opinion]]></category> <category><![CDATA[Election 2020]]></category> <category><![CDATA[impeachment]]></category> <category><![CDATA[Jenny Beth Martin]]></category> <category><![CDATA[Lois Lerner]]></category> <category><![CDATA[Opinion]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6822068</guid> <description><![CDATA[It\'s become a standard practice out of Washington\'s playbook.]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/martin-bureaucrats-incompetence/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Opinion</category><category></category> </item> <item> <title>Terrence Williams On How To Improve Public Discourse</title> <link>https://dailycaller.com/2020/01/10/terrence-williams-political-comedian/</link> <comments>https://dailycaller.com/2020/01/10/terrence-williams-political-comedian/#respond</comments> <pubDate>Fri, 10 Jan 2020 20:19:06 +0000</pubDate> <dc:creator><![CDATA[Stephanie Hamill]]></dc:creator> <category><![CDATA[DC Exclusives - Video]]></category> <category><![CDATA[US]]></category> <category><![CDATA[Video]]></category> <category><![CDATA[Video Landing]]></category> <category><![CDATA[comedy]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[Politics]]></category> <category><![CDATA[Terrence Williams]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6819401</guid> <description><![CDATA[Take notes! ]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/terrence-williams-political-comedian/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Opinion</category><category></category> </item> <item> <title>Texas Won&#8217;t Accept Refugees, Greg Abbott Letter Confirms</title> <link>https://dailycaller.com/2020/01/10/texas-refugees-greg-abbott/</link> <comments>https://dailycaller.com/2020/01/10/texas-refugees-greg-abbott/#respond</comments> <pubDate>Fri, 10 Jan 2020 19:58:20 +0000</pubDate> <dc:creator><![CDATA[William Davis]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[Greg Abbott]]></category> <category><![CDATA[Mike Pompeo]]></category> <category><![CDATA[Texas]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821965</guid> <description><![CDATA[Texas Becomes First State To Opt-Out Of Refugee Program]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/texas-refugees-greg-abbott/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Politics</category><category></category> </item> <item> <title>Ann Coulter Mocks Trump: &#8216;He&#8217;s Built 0.2% Of The Wall!&#8217;</title> <link>https://dailycaller.com/2020/01/10/ann-coulter-mocks-trump-built-the-wall/</link> <comments>https://dailycaller.com/2020/01/10/ann-coulter-mocks-trump-built-the-wall/#respond</comments> <pubDate>Fri, 10 Jan 2020 19:55:33 +0000</pubDate> <dc:creator><![CDATA[Justin Caruso]]></dc:creator> <category><![CDATA[DC Exclusives - Blurb]]></category> <category><![CDATA[Ann Coulter]]></category> <category><![CDATA[Donald Trump]]></category> <category><![CDATA[The Wall]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821347</guid> <description><![CDATA[She makes fun of the president.]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/ann-coulter-mocks-trump-built-the-wall/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Politics</category><category></category> </item> <item> <title>Hero Shoots Armed Robber In Epic Video</title> <link>https://dailycaller.com/2020/01/10/armed-robbery-liveleak-video-shooting/</link> <comments>https://dailycaller.com/2020/01/10/armed-robbery-liveleak-video-shooting/#respond</comments> <pubDate>Fri, 10 Jan 2020 19:24:45 +0000</pubDate> <dc:creator><![CDATA[David Hookstead]]></dc:creator> <category><![CDATA[DC Exclusives - Opinion]]></category> <category><![CDATA[Smoke Room]]></category> <category><![CDATA[Smoke Room Cross Post]]></category> <category><![CDATA[Video]]></category> <category><![CDATA[Liveleak]]></category> <category><![CDATA[Robbery]]></category> <category><![CDATA[Viral Video]]></category> <guid isPermaLink="false">https://dailycaller.com/?p=6821935</guid> <description><![CDATA[It\'s crazy]]></description> <wfw:commentRss>https://dailycaller.com/2020/01/10/armed-robbery-liveleak-video-shooting/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <category>Editorial</category><category></category> </item> </channel> </rss>'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches);

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php