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
No Match

r"
"

Test String

Code Generator

Generated Code

#include <StringConstants.au3> ; to declare the Constants of StringRegExp #include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate Local $sRegex = "href="(.+?)">ذهاب الان</a>" Local $sString = "" & @CRLF & _ "<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="ar">" & @CRLF & _ "<head profile="http://gmpg.org/xfn/11">" & @CRLF & _ "<base href="http://movizland.com"/>" & @CRLF & _ "<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>" & @CRLF & _ "<title itemprop='name'>مشاهدة فيلم Steve Jobs 2015 مترجم بجودة 1080p BluRay </title>" & @CRLF & _ "<meta name="viewport" content="width=device-width"/>" & @CRLF & _ "<meta http-equiv="Content-Language" content="en-us,ar"/>" & @CRLF & _ "<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>" & @CRLF & _ "<meta name="description" content="Movizland - موفيز لاند - فيلم&nbsp; Steve Jobs 2015 BluRay, مشاهدة فيلم Steve Jobs 2015 BluRay, تحميل , مشاهدة Steve Jobs 2015 BluRay اون لاين, Steve Jobs 2015 BluRay مترجم بلوراي, تحميل مباشر فيلم&nbsp; Steve Jobs 2015 BluRay, مشاهدة مباشرة لفيلم&nbsp; Steve Jobs 2015 BluRay, شاهد اون لاين فيلم&nbsp; Steve Jobs 2015 BluRay, فيلم&nbsp; Steve Jobs 2015 BluRay كامل مترجم, فيلم&nbsp; Steve Jobs 2015 BluRay مترجم كامل, تنزيل فيلم Steve Jobs 2015 BluRay, مشاهدة فيلم Steve Jobs 2015 BluRay, فيلم Steve Jobs 2015 BluRay بجودة عالية">" & @CRLF & _ "<meta name="keywords" content="Movizland,موفيز لاند,موفيزلاند,أفلام اجنبية,افلام,دراما,سيره ذاتيه,">" & @CRLF & _ "<meta http-equiv="Content-Language" content="ar-eg"/>" & @CRLF & _ "<meta http-equiv="Cache-Control" content="no-cache"/>" & @CRLF & _ "<meta http-equiv="Pragma" content="no-cache"/>" & @CRLF & _ "<meta name="Expires" content="0"/>" & @CRLF & _ "<meta name="rating" content="General"/>" & @CRLF & _ "<meta name="robots" content="index, follow"/>" & @CRLF & _ "<meta name="robots" content="NOODP,NOYDIR"/>" & @CRLF & _ "<meta name="revisit-after" content="1 hour"/>" & @CRLF & _ "<meta name="distribution" content="Global"/>" & @CRLF & _ "<meta name="classification" content="All"/>" & @CRLF & _ "<meta name="googlebot" content="archive"/>" & @CRLF & _ "<meta name="resource-type" content="document"/>" & @CRLF & _ "<meta name="author" content="Movizland .Com"/>" & @CRLF & _ "<meta property="og:type" content="article"/>" & @CRLF & _ "<meta property="og:url" content="http://movizland.com/movies/%d9%81%d9%8a%d9%84%d9%85-steve-jobs-2015-%d9%85%d8%aa%d8%b1%d8%ac%d9%85-%d8%a8%d8%ac%d9%88%d8%af%d8%a9-1080p-bluray/"/>" & @CRLF & _ "<script type="text/javascript">" & @CRLF & _ "//<![CDATA[" & @CRLF & _ "try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok3v=1613a3a185/"},atok:"2841200b99e0503213236eb6beec5cc0",petok:"0b0dd91ad9f44b84332bd5593c41a44e9283c53a-1454659108-1800",zone:"movizland.com",rocket:"a",apps:{},sha2test:0}];document.write('<script type="text/javascript" src="//ajax.cloudflare.com/cdn-cgi/nexp/dok3v=38857570ac/cloudflare.min.js"><'+'\/script>');}}catch(e){};" & @CRLF & _ "//]]>" & @CRLF & _ "</script>" & @CRLF & _ "<link itemprop="url" rel="canonical" href="http://movizland.com/movies/%d9%81%d9%8a%d9%84%d9%85-steve-jobs-2015-%d9%85%d8%aa%d8%b1%d8%ac%d9%85-%d8%a8%d8%ac%d9%88%d8%af%d8%a9-1080p-bluray/"/>" & @CRLF & _ "<meta property="og:title" content="فيلم Steve Jobs 2015 مترجم بجودة 1080p BluRay"/>" & @CRLF & _ "<meta property="og:image:secure_url" content=""/>" & @CRLF & _ "<meta property="og:image" content="http://movizland.com/wp-content/uploads/steve_jobs_ver2-1.jpg"/>" & @CRLF & _ "<meta property="og:site_name" content="Movizland"/>" & @CRLF & _ "<meta property="og:description" content="Movizland - موفيز لاند - فيلم&nbsp; Steve Jobs 2015 BluRay, مشاهدة فيلم Steve Jobs 2015 BluRay, تحميل , مشاهدة Steve Jobs 2015 BluRay اون لاين, Steve Jobs 2015 BluRay مترجم بلوراي, تحميل مباشر فيلم&nbsp; Steve Jobs 2015 BluRay, مشاهدة مباشرة لفيلم&nbsp; Steve Jobs 2015 BluRay, شاهد اون لاين فيلم&nbsp; Steve Jobs 2015 BluRay, فيلم&nbsp; Steve Jobs 2015 BluRay كامل مترجم, فيلم&nbsp; Steve Jobs 2015 BluRay مترجم كامل, تنزيل فيلم Steve Jobs 2015 BluRay, مشاهدة فيلم Steve Jobs 2015 BluRay, فيلم Steve Jobs 2015 BluRay بجودة عالية">" & @CRLF & _ "<link rel="pingback" href="http://movizland.com/xmlrpc.php"/>" & @CRLF & _ "<link rel="alternate" type="application/rss+xml" href="http://movizland.com/feed" title="Movizland .Com"/>" & @CRLF & _ "<link href='http://fonts.googleapis.com/css?family=Niconne' rel='stylesheet' type='text/css'/>" & @CRLF & _ "<script type="text/rocketscript" data-rocketsrc="http://movizland.com/wp-content/themes/new/js/jquery-1.8.2.min.js"></script>" & @CRLF & _ "<link rel="stylesheet" type="text/css" href="http://movizland.com/wp-content/themes/new/style.css"/>" & @CRLF & _ "<link rel="stylesheet" type="text/css" href="http://movizland.com/wp-content/themes/new/css/font-awesome.min.css"/>" & @CRLF & _ "<script type="application/ld+json">" & @CRLF & _ " { "@context" : "http://schema.org"," & @CRLF & _ " "@type" : "WebSite"," & @CRLF & _ " "name" : "Movizland"," & @CRLF & _ " "alternateName" : "Movizland.Com"," & @CRLF & _ " "url" : "http://movizland.com"" & @CRLF & _ " }" & @CRLF & _ " </script>" & @CRLF & _ "</head>" & @CRLF & _ "<body style="background-image:url('http://movizland.com/wp-content/uploads/thehungergames.jpg');">" & @CRLF & _ "<header>" & @CRLF & _ "<div class="dropmenu-nav">" & @CRLF & _ "<li><a href="http://movizland.com/">الرئيسية</a> </li>" & @CRLF & _ "<li><a href="http://vb.movizland.com/">المنتدي</a> </li>" & @CRLF & _ "<li><a href="http://vb.movizland.com/f15">طلبات الافلام</a> </li>" & @CRLF & _ "<li><a href="http://vb.movizland.com/f20">مواضيع تهمك</a> </li>" & @CRLF & _ "<li><a href="http://movizland.com/vb/sendmessage.php">اتصل بنا</a> </li>" & @CRLF & _ "</div>" & @CRLF & _ "<div class="cpanel">" & @CRLF & _ "<li class="btn-red future-btn"> <a href="http://movizland.com/vb/t11910"> اشتراك مميز <span style="text-align: center;font-size: 13px;display: block;margin-top: -4px;margin-bottom: -3px;">خواص بلا حدود</span> </a> </li>" & @CRLF & _ "<li class="btn-red app-btn"> <a href="http://www.movizland.com/MovizLand_1.0.apk"> تحميل التطبيق<br> <span style="text-align: center;font-size: 13px;display: block;margin-top: -4px;margin-bottom: -3px;">لموبايل اندرويد</span> </a> </li>" & @CRLF & _ "</div>" & @CRLF & _ "<div class="center">" & @CRLF & _ "<div class="tiny-stars"><img src="http://movizland.com/wp-content/themes/new/img/stars2.svg" alt="Movizland .Com"></div>" & @CRLF & _ "<div class="tiny-stars middle-stars"><img src="http://movizland.com/wp-content/themes/new/img/stars3.svg" alt="Movizland .Com"></div>" & @CRLF & _ "<div class="planet-big centered">" & @CRLF & _ " <span class="round round-1"></span> <span class="round round-2"></span> <span class="round round-3"></span> <span class="round round-4"></span> <span class="round round-5"></span> " & @CRLF & _ "</div>" & @CRLF & _ " " & @CRLF & _ "</div>" & @CRLF & _ "<div id="poster">" & @CRLF & _ "<div id="letter-container" class="letter-container">" & @CRLF & _ "<h2> <a href="http://movizland.com/"><span class="char1">M</span><span class="char2">o</span><span class="char3">v</span><span class="char4">i</span><span class="char5">z</span><span class="char6"> </span><span class="char7">L</span><span class="char8">a</span><span class="char9">n</span><span class="char10">d</span></a> <a href="http://movizland.com/" style="font-size:52px"><span class="char1">A</span><span class="char2">l</span><span class="char3">l</span><span class="char4"> </span><span class="char5">M</span><span class="char6">o</span><span class="char7">v</span><span class="char8">i</span><span class="char9">e</span><span class="char10">s</span><span class="char11"> </span><span class="char12">I</span><span class="char13">n</span><span class="char14"> </span><span class="char15">Y</span><span class="char16">o</span><span class="char17">u</span><span class="char18">r</span><span class="char19"> </span><span class="char20">H</span><span class="char21">a</span><span class="char22">n</span><span class="char23">d</span></a> </h2>" & @CRLF & _ "</div>" & @CRLF & _ "</div>" & @CRLF & _ "<div class="holderB"></div>" & @CRLF & _ "<style>div#title-movie>strong{position:absolute;top:-17px;right:14px;background:#81011D;color:white;font-weight:normal;padding:3px 10px;border-radius:4px;}div#title-movie{position:absolute;bottom:30px;right:50%;margin-right:-500px;background:black;border-radius:10px;padding:21px 20px 20px;font-size:14px;font-family:Flat;width:420px;border:2px solid #151515;box-shadow:0px 1px 26px black;}</style>" & @CRLF & _ "</header>" & @CRLF & _ "<div class="wrap"><main class="home-boxes" id="seccion2">" & @CRLF & _ " " & @CRLF & _ "<script data-cfasync="false" type="text/javascript" src="//go.onclasrv.com/apu.php?zoneid=496414"></script>" & @CRLF & _ "<script type="text/rocketscript">" & @CRLF & _ "var adParams = {p: '60161217', serverdomain: 'wmedia' , numOfTimes: '1',duration: '5',period: 'minute' };" & @CRLF & _ "</script>" & @CRLF & _ "<script type="text/rocketscript" data-rocketsrc='http://cdn.waframedia8.com/wmedia/tags/xpopup/xpopup.js?ap=1303'></script>" & @CRLF & _ "<div class="movie-single">" & @CRLF & _ "<h2 class="title-ribbon">" & @CRLF & _ "<span></span>" & @CRLF & _ "<strong>" & @CRLF & _ "جديد" & @CRLF & _ "</strong>" & @CRLF & _ "<em class="afters"></em>" & @CRLF & _ "<em class="befores">" & @CRLF & _ "فيلم Steve Jobs 2015 مترجم بجودة 1080p BluRay </em>" & @CRLF & _ "</h2>" & @CRLF & _ "<div class="ad">" & @CRLF & _ "<script type="text/rocketscript">" & @CRLF & _ "var adParams = {p: '60401138', size: '728x90', serverdomain: 'wmedia' };" & @CRLF & _ "</script>" & @CRLF & _ "<script type="text/rocketscript" data-rocketsrc='http://cdn.waframedia8.com/wmedia/tags/xbanner/xbanner.js?ap=1300'></script></div>" & @CRLF & _ "<div class="ad-vertical"><SCRIPT data-cfasync="false" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=551769&bid=1744544" TYPE="text/javascript"></SCRIPT></div>" & @CRLF & _ "<div class="poster-movie">" & @CRLF & _ "<a href="http://vb.movizland.com/t30586"><img width="490" height="640" src="http://movizland.com/wp-content/uploads/steve_jobs_ver2-1-490x640.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="steve_jobs_ver2"/></a>" & @CRLF & _ "</div>" & @CRLF & _ "<div class="box-content" style="color: white;font-family: Flat , Arial;">" & @CRLF & _ "فيلم&nbsp; Steve Jobs 2015 BluRay, مشاهدة فيلم Steve Jobs 2015 BluRay, تحميل , مشاهدة Steve Jobs 2015 BluRay اون لاين, Steve Jobs 2015 BluRay مترجم بلوراي, تحميل مباشر فيلم&nbsp; Steve Jobs 2015 BluRay, مشاهدة مباشرة لفيلم&nbsp; Steve Jobs 2015 BluRay, شاهد اون لاين فيلم&nbsp; Steve Jobs 2015 BluRay, فيلم&nbsp; Steve Jobs 2015 BluRay كامل مترجم, فيلم&nbsp; Steve Jobs 2015 BluRay مترجم كامل, تنزيل فيلم Steve Jobs 2015 BluRay, مشاهدة فيلم Steve Jobs 2015 BluRay, فيلم Steve Jobs 2015 BluRay بجودة عالية <div style="height:10px;"></div>" & @CRLF & _ "<btns class="btns-asni-anim-1">" & @CRLF & _ "<span>نوع الفيلم</span>" & @CRLF & _ "<div class="fortermS">" & @CRLF & _ "<a href="http://movizland.com/all/%d8%af%d8%b1%d8%a7%d9%85%d8%a7/" title="افلام دراما">دراما</a>" & @CRLF & _ "<a href="http://movizland.com/all/%d8%b3%d9%8a%d8%b1%d9%87-%d8%b0%d8%a7%d8%aa%d9%8a%d9%87/" title="افلام سيره ذاتيه">سيره ذاتيه</a>" & @CRLF & _ "</div>" & @CRLF & _ "</btns>" & @CRLF & _ "<btns class="btns-asni-anim-2">" & @CRLF & _ "<span>قسم الفيلم</span>" & @CRLF & _ "<div class="fortermS">" & @CRLF & _ "<a href="http://movizland.com/cat/foreign/" title="قسم أفلام اجنبية">أفلام اجنبية</a>" & @CRLF & _ "<a href="http://movizland.com/cat/movies/" title="قسم افلام">افلام</a>" & @CRLF & _ "</div>" & @CRLF & _ "</btns>" & @CRLF & _ "<div class="progress">" & @CRLF & _ "<a class="RedirecTliNK" style="" & @CRLF & _ " background: rgb(173, 0, 79);" & @CRLF & _ " margin: 10px auto 0;" & @CRLF & _ " font-family: Flat;" & @CRLF & _ " border: 2px solid rgba(255, 255, 255, 0.27);" & @CRLF & _ " padding: 7px 15px;" & @CRLF & _ " font-size: 25px;" href="http://moshahda.net/lw44qevnqkn9.html">ذهاب الان</a>" & @CRLF & _ "</div>" & @CRLF & _ "<div class="ad">" & @CRLF & _ " " & @CRLF & _ " " & @CRLF & _ "<script type="text/rocketscript">" & @CRLF & _ "var adParams = {p: '70248929', size: '300x250', serverdomain: 'wmedia' };" & @CRLF & _ "</script>" & @CRLF & _ "<script type="text/rocketscript" data-rocketsrc='http://cdn.waframedia8.com/wmedia/tags/xbanner/xbanner.js?ap=1300'></script>" & @CRLF & _ "</div>" & @CRLF & _ "</div>" & @CRLF & _ "<div class="ad-vertical-2"><SCRIPT data-cfasync="false" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=551769&bid=1744544" TYPE="text/javascript"></SCRIPT></div>" & @CRLF & _ "</div>" & @CRLF & _ "<style type="text/css">.progress{float:left;}.histats{clear:both;}</style>" & @CRLF & _ "<script type="text/rocketscript">" & @CRLF & _ "var adParams = {p: '70161427', closeButton: 'Left' , backgroundColor: 'transparent', size: '320x50',popOnClose:'true', serverdomain: 'wafra',period: 'minute', numOfTimes: '1',duration: '2' };" & @CRLF & _ "</script>" & @CRLF & _ "<script type="text/rocketscript" data-rocketsrc='http://cdn.waframedia8.com/wafra/tags/xcatfish/xcatfish.js?ap=1301'></script>" & @CRLF & _ "</div> <div class="aligncenter histats"> <script type="text/rocketscript">(function() {var _fbq = window._fbq || (window._fbq = []); if (!_fbq.loaded) {var fbds = document.createElement('script'); fbds.async = true; fbds.src = '//connect.facebook.net/en_US/fbds.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fbds, s); _fbq.loaded = true; } })(); window._fbq = window._fbq || []; window._fbq.push(['track', '6022448280372', {'value':'0.00','currency':'USD'}]); </script> <noscript><img alt="" height="1" width="1" alt="facebook" style="display:none" src="https://www.facebook.com/tr?ev=6022448280372&amp;cd[value]=0.00&amp;cd[currency]=USD&amp;noscript=1"/></noscript> <script type="text/rocketscript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-51106521-2', 'auto'); ga('send', 'pageview'); </script>" & @CRLF & _ " " & @CRLF & _ "<a href="http://www.histats.com" alt="page hit counter" target="_blank">" & @CRLF & _ "<embed src="http://s10.histats.com/6.swf" flashvars="jver=1&acsid=2308846&domi=4" quality="high" width="200" height="40" name="6.swf" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/></a>" & @CRLF & _ "<img src="http://sstatic1.histats.com/0.gif?2308846&101" alt="free html hit counter" border="0">" & @CRLF & _ " </div> <div class="footer"> <div class="copyrights"> <a href="http://movizland.com" title="Movizland .Com">Movizland.com</a> </div> <div class="design"> تصميم و برمجة <a href="http://www.yourcolor.net" title="تصميم مواقع | برمجة خاصة | برمجة ووردبريس | استضافة" alt="تصميم و برمجة و استضافة">YourColor.net</a> </div> </div> <div id="overlay-closes" style="display:none;"></div> </body> </html>" & @CRLF & _ " " Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH) ; Present the entire match result _ArrayDisplay($aArray, "Result")

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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm