Regular Expressions 101

Save & Share

  • Regex Version: ver. 1
  • Update Regex
    ctrl+⇧+s
  • Save new Regex
    ctrl+s
  • Add to Community Library

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

/
/
g

Test String

Code Generator

Generated Code

$re = '/\{(?:[^{}]|(?R))*\}/'; $str = ' <!DOCTYPE html> <!--[if lt IE 7]> <html lang="sv" class="no-js lt-ie9 lt-ie8 lt-ie7 logged-in "> <![endif]--> <!--[if IE 7]> <html lang="sv" class="no-js lt-ie9 lt-ie8 logged-in "> <![endif]--> <!--[if IE 8]> <html lang="sv" class="no-js lt-ie9 logged-in "> <![endif]--> <!--[if gt IE 8]><!--> <html lang="sv" class="no-js logged-in "> <!--<![endif]--> <head><meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title> Kim Kardashian West (@kimkardashian) • Foton och videoklipp på Instagram </title> <script type="text/javascript"> WebFontConfig = { custom: { families: [\'proxima-nova:n3,n4,n6,n7\'], } }; </script> <script async type="text/javascript" src="/static/scripts/webfont.js/c0456c81549b.js"></script> <style type="text/css"> /* @license * MyFonts Webfont Build ID 2164953, 2012-03-23T23:06:30-0400 * * The fonts listed in this notice are subject to the End User License * Agreement(s) entered into by the website owner. All other parties are * explicitly restricted from using the Licensed Webfonts(s). * * You may obtain a valid license at the URLs below. * ** Webfont: Proxima Nova Light by Mark Simonson * URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/light/ * Licensed pageviews: unlimited * * Webfont: Proxima Nova Regular by Mark Simonson * URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/regular/ * Licensed pageviews: unlimited * * Webfont: Proxima Nova Semibold by Mark Simonson * URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/semibold/ * Licensed pageviews: unlimited ** Webfont: Proxima Nova Bold Italic by Mark Simonson * URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/bold-it/ * Licensed pageviews: unlimited * * Webfont: Proxima Nova Bold by Mark Simonson * URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/bold/ * Licensed pageviews: unlimited * * Webfont: Proxima Nova Italic by Mark Simonson * URL: http://www.myfonts.com/fonts/marksimonson/proxima-nova/regular-it/ * Licensed pageviews: unlimited * * * License: http://www.myfonts.com/viewlicense?type=web&buildid=2164953 * Webfonts copyright: Copyright (c) Mark Simonson, 2005. All rights reserved. * * (c) 2012 Bitstream Inc */@font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-bold-webfont.eot/115b1f7f9c04.eot\'); src: url(\' /static/webfonts/proximanova-bold-webfont.eot/115b1f7f9c04.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-bold-webfont.woff/618250d25a4d.woff\') format("woff"), url(\' /static/webfonts/proximanova-bold-webfont.ttf/646346e03084.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-bold-webfont.svg/e55a9d6051e8.svg#ProximaNovaBold\') format("svg"); font-weight: bold; font-style: normal; unicode-range: U+0000-00FF, U+0180-FFFF; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-bold-latin-a-webfont.eot/78bfc2a26356.eot\'); src: url(\' /static/webfonts/proximanova-bold-latin-a-webfont.eot/78bfc2a26356.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-bold-latin-a-webfont.woff/2db359b9065d.woff\') format("woff"), url(\' /static/webfonts/proximanova-bold-latin-a-webfont.ttf/5ae1219dca10.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-bold-latin-a-webfont.svg/017659bcaa88.svg#proxima_nova_rgbold\') format("svg"); font-weight: bold; font-style: normal; unicode-range: U+0100-017F; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-boldit-webfont.eot/1cbb869da891.eot\'); src: url(\' /static/webfonts/proximanova-boldit-webfont.eot/1cbb869da891.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-boldit-webfont.woff/b1cf049474c9.woff\') format("woff"), url(\' /static/webfonts/proximanova-boldit-webfont.ttf/3adb020ceae3.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-boldit-webfont.svg/29948a2d3c58.svg#ProximaNovaBoldItalic\') format("svg"); font-weight: bold; font-style: italic; unicode-range: U+0000-00FF, U+0180-FFFF; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-boldit-latin-a-webfont.eot/72586d286717.eot\'); src: url(\' /static/webfonts/proximanova-boldit-latin-a-webfont.eot/72586d286717.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-boldit-latin-a-webfont.woff/ea0011f1fa31.woff\') format("woff"), url(\' /static/webfonts/proximanova-boldit-latin-a-webfont.ttf/54abdaf3ee52.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-boldit-latin-a-webfont.svg/c4f67e496911.svg#proxima_novabold_italic\') format("svg"); font-weight: bold; font-style: italic; unicode-range: U+0100-017F; }@font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-reg-webfont.eot/12af77715cee.eot\'); src: url(\' /static/webfonts/proximanova-reg-webfont.eot/12af77715cee.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-reg-webfont.woff/a9a9773b8e29.woff\') format("woff"), url(\' /static/webfonts/proximanova-reg-webfont.ttf/99e19808976a.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-reg-webfont.svg/c33d2fd56309.svg#ProximaNovaRegular\') format("svg"); font-weight: normal; font-style: normal; unicode-range: U+0000-00FF, U+0180-FFFF; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-reg-latin-a-webfont.eot/58dcfca24dc5.eot\'); src: url(\' /static/webfonts/proximanova-reg-latin-a-webfont.eot/58dcfca24dc5.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-reg-latin-a-webfont.woff/b84975dc78a8.woff\') format("woff"), url(\' /static/webfonts/proximanova-reg-latin-a-webfont.ttf/794fcdf7d5cc.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-reg-latin-a-webfont.svg/08bad2145add.svg#proxima_nova_rgregular\') format("svg"); font-weight: normal; font-style: normal; unicode-range: U+0100-017F; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-regit-webfont.eot/1bbbd1312b0d.eot\'); src: url(\' /static/webfonts/proximanova-regit-webfont.eot/1bbbd1312b0d.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-regit-webfont.woff/9e306befca91.woff\') format("woff"), url(\' /static/webfonts/proximanova-regit-webfont.ttf/4a8663684135.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-regit-webfont.svg/876278d4b189.svg#ProximaNovaRegularItalic\') format("svg"); font-weight: normal; font-style: italic; unicode-range: U+0000-00FF, U+0180-FFFF; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-regit-latin-a-webfont.eot/1442d729c835.eot\'); src: url(\' /static/webfonts/proximanova-regit-latin-a-webfont.eot/1442d729c835.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-regit-latin-a-webfont.woff/7bce76dac8b7.woff\') format("woff"), url(\' /static/webfonts/proximanova-regit-latin-a-webfont.ttf/dfd8b0fc929b.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-regit-latin-a-webfont.svg/bb408d54ba63.svg#proxima_novaregular_italic\') format("svg"); font-weight: normal; font-style: italic; unicode-range: U+0100-017F; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-sbold-webfont.eot/5016edf79e1d.eot\'); src: url(\' /static/webfonts/proximanova-sbold-webfont.eot/5016edf79e1d.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-sbold-webfont.woff/615c1b06d8fa.woff\') format("woff"), url(\' /static/webfonts/proximanova-sbold-webfont.ttf/2973bd483f7a.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-sbold-webfont.svg/868597833e49.svg#ProximaNovaSemibold\') format("svg"); font-weight: 600; font-style: normal; unicode-range: U+0000-00FF, U+0180-FFFF; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-sbold-latin-a-webfont.eot/6385b14bf318.eot\'); src: url(\' /static/webfonts/proximanova-sbold-latin-a-webfont.eot/6385b14bf318.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-sbold-latin-a-webfont.woff/0a6bfac8fce0.woff\') format("woff"), url(\' /static/webfonts/proximanova-sbold-latin-a-webfont.ttf/6863621ed50b.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-sbold-latin-a-webfont.svg/608e88ac1050.svg#proxima_nova_ltsemibold\') format("svg"); font-weight: 600; font-style: normal; unicode-range: U+0100-017F; }@font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-light-webfont.eot/63c84728610f.eot\'); src: url(\' /static/webfonts/proximanova-light-webfont.eot/63c84728610f.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-light-webfont.woff/66bbe029f180.woff\') format("woff"), url(\' /static/webfonts/proximanova-light-webfont.ttf/eb408516399b.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-light-webfont.svg/858f6a9b7ef3.svg#ProximaNovaLight\') format("svg"); font-weight: 300; font-style: normal; unicode-range: U+0000-00FF, U+0180-FFFF; } @font-face { font-family: \'proxima-nova\'; src: url(\' /static/webfonts/proximanova-light-latin-a-webfont.eot/11d79924ec61.eot\'); src: url(\' /static/webfonts/proximanova-light-latin-a-webfont.eot/11d79924ec61.eot?#iefix\') format("embedded-opentype"), url(\' /static/webfonts/proximanova-light-latin-a-webfont.woff/bea5ea967c26.woff\') format("woff"), url(\' /static/webfonts/proximanova-light-latin-a-webfont.ttf/3a5fa8856fd7.ttf\') format("truetype"), url(\' /static/webfonts/proximanova-light-latin-a-webfont.svg/36736d1d0811.svg#proxima_nova_ltlight\') format("svg"); font-weight: 300; font-style: normal; unicode-range: U+0100-017F; }</style> <meta name="robots" content="noimageindex"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#000000"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta id="viewport" name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1"> <script type="text/javascript"> (function() { var docElement = document.documentElement; var classRE = new RegExp(\'(^|\\\\s)no-js(\\\\s|$)\'); var className = docElement.className; docElement.className = className.replace(classRE, \'$1js$2\'); })(); </script> <script type="text/javascript">window._timings = {"domLoading": Date.now()}</script> <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/static/images/ico/apple-touch-icon-76x76-precomposed.png/932e4d9af891.png"> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/static/images/ico/apple-touch-icon-120x120-precomposed.png/004705c9353f.png"> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/static/images/ico/apple-touch-icon-152x152-precomposed.png/82467bc9bcce.png"> <link rel="apple-touch-icon-precomposed" sizes="167x167" href="/static/images/ico/apple-touch-icon-167x167-precomposed.png/515cb4eeeeee.png"> <link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/images/ico/apple-touch-icon-180x180-precomposed.png/94fd767f257b.png"> <link rel="icon" sizes="192x192" href="/static/images/ico/favicon-192.png/b407fa101800.png"> <link rel="mask-icon" href="/static/images/ico/favicon.svg/9d8680ab8a3c.svg" color="#262626"><link rel="shortcut icon" type="image/x-icon" href="/static/images/ico/favicon.ico/dfa85bb1fd63.ico"> <link rel="alternate" href="android-app://com.instagram.android/https/instagram.com/_u/kimkardashian/" /> <meta property="al:ios:app_name" content="Instagram" /> <meta property="al:ios:app_store_id" content="389801252" /> <meta property="al:ios:url" content="instagram://user?username=kimkardashian" /> <meta property="al:android:app_name" content="Instagram" /> <meta property="al:android:package" content="com.instagram.android" /> <meta property="al:android:url" content="https://www.instagram.com/_u/kimkardashian/" /> <link rel="canonical" href="https://www.instagram.com/kimkardashian/" /><meta name="description" content="97.4 mn följare, 98 följer, 3,718 inlägg - Se foton och videoklipp från Kim Kardashian West (@kimkardashian) på Instagram" /> <meta property="og:type" content="profile" /> <meta property="og:image" content="https://scontent-arn2-1.cdninstagram.com/t51.2885-19/s150x150/15877470_1793699214215757_155858904268406784_a.jpg" /> <meta property="og:title" content="Kim Kardashian West (@kimkardashian) • Foton och videoklipp på Instagram" /> <meta property="og:description" content="97.4 mn följare, 98 följer, 3,718 inlägg - Se foton och videoklipp från Kim Kardashian West (@kimkardashian) på Instagram" /> <meta property="og:url" content="https://www.instagram.com/kimkardashian/" /> <link hreflang="x-default" rel="alternate" href="https://www.instagram.com/kimkardashian/" /> <link hreflang="hr" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=hr" /> <link hreflang="hu" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=hu" /> <link hreflang="ur" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ur" /> <link hreflang="ne" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ne" /> <link hreflang="de" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=de" /> <link hreflang="sr" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=sr" /> <link hreflang="ml" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ml" /> <link hreflang="nl" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=nl" /> <link hreflang="id" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=id" /> <link hreflang="es" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=es" /> <link hreflang="th" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=th" /> <link hreflang="cs" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=cs" /> <link hreflang="da" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=da" /> <link hreflang="tl" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=tl" /> <link hreflang="pl" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=pl" /> <link hreflang="uk" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=uk" /> <link hreflang="sv" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=sv" /> <link hreflang="gu" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=gu" /> <link hreflang="ro" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ro" /> <link hreflang="ko" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ko" /> <link hreflang="ja" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ja" /> <link hreflang="el" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=el" /> <link hreflang="ru" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ru" /> <link hreflang="vi" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=vi" /> <link hreflang="af" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=af" /> <link hreflang="bn" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=bn" /> <link hreflang="nb" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=nb" /> <link hreflang="bg" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=bg" /> <link hreflang="hi" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=hi" /> <link hreflang="zh-cn" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=zh-cn" /> <link hreflang="pt" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=pt" /> <link hreflang="kn" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=kn" /> <link hreflang="tr" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=tr" /> <link hreflang="fr" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=fr" /> <link hreflang="fi" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=fi" /> <link hreflang="zh-tw" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=zh-tw" /> <link hreflang="te" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=te" /> <link hreflang="sk" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=sk" /> <link hreflang="ta" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ta" /> <link hreflang="it" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=it" /> <link hreflang="pt-br" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=pt-br" /> <link hreflang="si" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=si" /> <link hreflang="fr-ca" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=fr-ca" /> <link hreflang="pa" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=pa" /> <link hreflang="mr" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=mr" /> <link hreflang="en" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=en" /> <link hreflang="zh-hk" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=zh-hk" /> <link hreflang="ms" rel="alternate" href="https://www.instagram.com/kimkardashian/?hl=ms" /> </head><body class=""> <span id="react-root"></span> <script type="text/javascript">window._sharedData = {"activity_counts": {"comment_likes": 0, "comments": 4, "likes": 10, "relationships": 20, "usertags": 3}, "entry_data": {"ProfilePage": [{"user": {"follows_viewer": false, "profile_pic_url_hd": "https://scontent-arn2-1.cdninstagram.com/t51.2885-19/s150x150/15877470_1793699214215757_155858904268406784_a.jpg", "followed_by": {"count": 97418668}, "username": "kimkardashian", "external_url_linkshimmed": "https://l.instagram.com/?e=ATP2fsvQPI-oWiXhdycpfmEXGteEJwnxuy3l6jxlIKx6uMzscnHh36_eZoIyrIbtMpRj4-E\\u0026u=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fkim-kardashian-west-official%2Fid1000716588%3Fmt%3D8", "is_verified": true, "biography": null, "follows": {"count": 98}, "blocked_by_viewer": false, "media": {"page_info": {"has_next_page": true, "end_cursor": "AQC6g81cVZI5LpF4ypzrmdnkznRBr_rByc35gA5brtK0OJ84xQhG7r8iEt9Bi7hJefhX2nmcgHV_R_6bE5lLrJ7ILrGNYF1TeJzePr8plmimqA"}, "nodes": [{"__typename": "GraphVideo", "id": "1487281384238524126", "comments_disabled": false, "dimensions": {"height": 612, "width": 612}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/17663326_500951300294521_8312953830413172736_n.jpg", "is_video": true, "code": "BSj4on8lqbe", "date": 1491517778, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/17663326_500951300294521_8312953830413172736_n.jpg", "video_views": 0, "caption": "KIMOJI.COM", "comments": {"count": 1405}, "likes": {"count": 90592}}, {"__typename": "GraphVideo", "id": "1487279341704616644", "comments_disabled": false, "dimensions": {"height": 640, "width": 640}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/e15/17595965_1439226889717343_5613678223314386944_n.jpg", "is_video": true, "code": "BSj4K5sFJrE", "date": 1491517535, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/e15/17595965_1439226889717343_5613678223314386944_n.jpg", "video_views": 0, "caption": "LIT LIGHTER KIMOJI.COM", "comments": {"count": 1058}, "likes": {"count": 127952}}, {"__typename": "GraphVideo", "id": "1487277847936791470", "comments_disabled": false, "dimensions": {"height": 612, "width": 612}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/17663558_1806246253028672_8005520865934442496_n.jpg", "is_video": true, "code": "BSj31KglHOu", "date": 1491517357, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/17663558_1806246253028672_8005520865934442496_n.jpg", "video_views": 0, "caption": "NEW @KIMOJI DROP UP NOW FOR LIMITED TIME KIMOJI.COM", "comments": {"count": 501}, "likes": {"count": 75014}}, {"__typename": "GraphImage", "id": "1486385211117955226", "comments_disabled": false, "dimensions": {"height": 800, "width": 640}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c0.89.713.713/17494440_1280968221989568_7530260774464258048_n.jpg", "is_video": false, "code": "BSgs3lsFGia", "date": 1491410946, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/sh0.08/e35/p640x640/17494440_1280968221989568_7530260774464258048_n.jpg", "caption": "BTS of DarkStar006 with @patmcgrathreal on my app", "comments": {"count": 12083}, "likes": {"count": 1111544}}, {"__typename": "GraphVideo", "id": "1486384383531667417", "comments_disabled": false, "dimensions": {"height": 360, "width": 640}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/c140.0.360.360/17663745_1841563972773866_6838618169037291520_n.jpg", "is_video": true, "code": "BSgsri8F8_Z", "date": 1491410848, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/17663745_1841563972773866_6838618169037291520_n.jpg", "video_views": 0, "caption": "DarkStar006 available at PatMcGrath.com #patmcgrathlabs006 @patmcgrathreal @makeupbymario @chrisappleton1", "comments": {"count": 3264}, "likes": {"count": 292361}}, {"__typename": "GraphImage", "id": "1486373616610647708", "comments_disabled": false, "dimensions": {"height": 682, "width": 1080}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c199.0.682.682/17663037_1930348977184909_1220270298364903424_n.jpg", "is_video": false, "code": "BSgqO3dlx6c", "date": 1491409564, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e35/17663037_1930348977184909_1220270298364903424_n.jpg", "caption": "PAT X KKW", "comments": {"count": 2305}, "likes": {"count": 617510}}, {"__typename": "GraphImage", "id": "1486370725418179383", "comments_disabled": false, "dimensions": {"height": 1151, "width": 1080}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c0.35.1080.1080/17437865_1954136984872675_3842576187394097152_n.jpg", "is_video": false, "code": "BSgpky1Fxs3", "date": 1491409219, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e35/17437865_1954136984872675_3842576187394097152_n.jpg", "caption": "Daily Front Row Fashion Awards with the baddest @mertalas @nickiminaj @fergie", "comments": {"count": 2712}, "likes": {"count": 862560}}, {"__typename": "GraphImage", "id": "1486366695186939277", "comments_disabled": false, "dimensions": {"height": 1350, "width": 1080}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c0.135.1080.1080/17817971_122820878258716_5202043060107608064_n.jpg", "is_video": false, "code": "BSgoqJYlr2N", "date": 1491408739, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e35/17817971_122820878258716_5202043060107608064_n.jpg", "caption": "Come and meet me in the bathroom staaaaallllll \\ud83d\\udcf8 @mertalas", "comments": {"count": 9107}, "likes": {"count": 1455951}}, {"__typename": "GraphVideo", "id": "1484528450735967343", "comments_disabled": false, "dimensions": {"height": 800, "width": 640}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/e15/c0.90.720.720/17596506_415250495519322_7525989631351848960_n.jpg", "is_video": true, "code": "BSaGsK1FAxv", "date": 1491189603, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e15/p640x640/17596506_415250495519322_7525989631351848960_n.jpg", "video_views": 0, "caption": "What we do at restaurants before everyone arrives. BTS \\ud83d\\udcf8 @mertalas", "comments": {"count": 9684}, "likes": {"count": 738789}}, {"__typename": "GraphImage", "id": "1483175727474312408", "comments_disabled": false, "dimensions": {"height": 1080, "width": 1080}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/17596704_1647565445260648_1544116703703597056_n.jpg", "is_video": false, "code": "BSVTHdHloTY", "date": 1491028346, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e35/17596704_1647565445260648_1544116703703597056_n.jpg", "caption": "\\ud83d\\udc97 @arianagrande", "comments": {"count": 20660}, "likes": {"count": 2041451}}, {"__typename": "GraphImage", "id": "1482968112697799498", "comments_disabled": false, "dimensions": {"height": 866, "width": 1080}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c107.0.866.866/17662835_1491264110907227_4500887785019801600_n.jpg", "is_video": false, "code": "BSUj6QylXNK", "date": 1491003596, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e35/17662835_1491264110907227_4500887785019801600_n.jpg", "caption": "Swish", "comments": {"count": 7361}, "likes": {"count": 1776132}}, {"__typename": "GraphImage", "id": "1482807036048012590", "comments_disabled": false, "dimensions": {"height": 1291, "width": 1080}, "owner": {"id": "18428658"}, "thumbnail_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/c0.105.1080.1080/17662653_1178317335610828_7199192493286490112_n.jpg", "is_video": false, "code": "BST_SSeF3Uu", "date": 1490984395, "display_src": "https://scontent-arn2-1.cdninstagram.com/t51.2885-15/e35/17662653_1178317335610828_7199192493286490112_n.jpg", "caption": "\\ud83d\\udc6f", "comments": {"count": 6649}, "likes": {"count": 1320716}}], "count": 3718}, "has_blocked_viewer": false, "id": "18428658", "full_name": "Kim Kardashian West", "external_url": "https://itunes.apple.com/us/app/kim-kardashian-west-official/id1000716588?mt=8", "connected_fb_page": null, "has_requested_viewer": false, "followed_by_viewer": false, "requested_by_viewer": false, "country_block": false, "is_private": false, "profile_pic_url": "https://scontent-arn2-1.cdninstagram.com/t51.2885-19/s150x150/15877470_1793699214215757_155858904268406784_a.jpg"}, "logging_page_id": "profilePage_18428658"}]}, "hostname": "www.instagram.com", "config": {"csrf_token": "RiNVzjrl7EhmOKrjECzRCjM2PXkspr8L", "viewer": {"id": "1745739372", "full_name": "Tattoos", "external_url": "http://onelink.to/emqdke", "profile_pic_url": "https://scontent-arn2-1.cdninstagram.com/t51.2885-19/10986106_1563157630605955_1111156432_a.jpg", "biography": "Follow for daily tattoo updates!\\n\\u274c DM for photo credit / removal\\n\\ud83d\\udcb0 DM for business inquiries\\nDownload Rise:", "has_profile_pic": true, "profile_pic_url_hd": "https://scontent-arn2-1.cdninstagram.com/t51.2885-19/10986106_1563157630605955_1111156432_a.jpg", "username": "tattoos_n_ink"}}, "qe": {"sidecar": {"g": "", "p": {}}, "gql": {"g": "", "p": {}}, "nav": {"g": "ig_web_client_nav_control_01", "p": {"client_nav": "false"}}, "video": {"g": "", "p": {}}, "ebd": {"g": "", "p": {}}, "us_li": {"g": "", "p": {}}, "feed": {"g": "", "p": {}}, "create": {"g": "control", "p": {}}, "profile": {"g": "test", "p": {"chaining": "true", "dismiss": "true"}}, "pm": {"g": "", "p": {}}, "nav_lo": {"g": "web_nav_logged_out_test_01", "p": {"logged_out_nav": "true"}}, "su_universe": {"g": "", "p": {}}, "ufi": {"g": "", "p": {}}, "deact": {"g": "control", "p": {"is_new": "false"}}, "ufi_loggedout": {"g": "", "p": {}}, "poe": {"g": "try_email_and_phone_login_test_with_text_05", "p": {"show_phone_or_email_text": "true", "try_email_and_phone_login": "true"}}, "us": {"g": "", "p": {}}}, "show_app_install": false, "display_properties_server_guess": {"pixel_ratio": 1.0, "viewport_width": 1920}, "platform": "windows_nt_10", "environment_switcher_visible_server_guess": true, "country_code": "SE", "language_code": "sv", "gatekeepers": {"sms": true, "ld": true}};</script> <script crossorigin="anonymous" type="text/javascript" src="/static/bundles/sv_SE_Commons.js/2ad107d9d538.js"></script> <script crossorigin="anonymous" type="text/javascript" src="/static/bundles/sv_SE_ProfilePage.js/391fa8fcb465.js"></script> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version=\'2.0\';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,\'script\',\'//connect.facebook.net/en_US/fbevents.js\'); fbq(\'init\', \'1425767024389221\'); fbq(\'track\', \'PageView\'); </script> <noscript> </noscript> <script type="text/javascript">window._timings.domInteractive = Date.now()</script> </body> </html>'; 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