主頁 > 知識庫 > 正則表達式在線測試工具

正則表達式在線測試工具

熱門標(biāo)簽:阿里云 服務(wù)器配置 Linux服務(wù)器 Mysql連接數(shù)設(shè)置 電子圍欄 團購網(wǎng)站 銀行業(yè)務(wù) 科大訊飛語音識別系統(tǒng)
復(fù)制代碼 代碼如下:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
head>
meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
meta http-equiv="Content-Language" content="zh-CN" />
meta name="author" content="wangorg(at)gmail.com,夢遲" />
meta name="Copyright" content="mengchi.cn,轉(zhuǎn)載請注明出處,作者夢遲原創(chuàng)。" />
meta name="description" content="閑來無事,做了個測試正則表達式的工具,轉(zhuǎn)載請注明出處." />
meta content="夢遲,在線測試,正則表達式,mengchi,正則,工具" />
title>在線測試正則表達式工具-夢遲出品/title>
script type="text/javascript">
function mengchi(){
var a=document.getElementById("mc1").value;
var b=document.getElementById("mc2").value;
var c=new RegExp(a,"g");
     document.getElementById("mc3").value="";
     pipei.innerHTML="匹配結(jié)果:0";
var arrMactches = b.match(c);
     for (var i=0;i arrMactches.length ; i++){
         if (a!=""){
             ee=document.getElementById("mc3").value+"\n"+arrMactches[i];
             document.getElementById("mc3").value=ee;
             pipei.innerHTML="匹配結(jié)果:"+(i+1);
         }
     }
document.getElementById("mc3").value=document.getElementById("mc3").value.replace("\r\n","");
}
function charu (text) {
    document.all.mc1.focus();
        event.srcElement.document.selection.createRange().text += text;
    document.all.mc1.blur();
}
function qingchu () {
    document.getElementById("mc1").value="";
}
/script>
/head>
!--body部代碼開始,作者夢遲(mengchi.cn)轉(zhuǎn)載請注明出處-->
body>
p>正則表達式:/p>
p>
input name="mc1" type="text" id="mc1" size="88" onblur="mengchi();"/>
/p>
p>
input type="button" value="^" onclick="charu('^');">
input type="button" value="[" onclick="charu('[');">
input type="button" value="a-z" onclick="charu('a-z');">
input type="button" value="0-9" onclick="charu('0-9');">
input type="button" value="]" onclick="charu(']');">
input type="button" value="+" onclick="charu('+');">
input type="button" value="*" onclick="charu('*');">
input type="button" value="?" onclick="charu('?');">
input type="button" value="." onclick="charu('.');">
input type="button" value="\" onclick="charu('\\');">
input type="button" value="w" onclick="charu('w');">
input type="button" value="b" onclick="charu('b');">
input type="button" value="d" onclick="charu('d');">
input type="button" value="f" onclick="charu('f');">
input type="button" value="n" onclick="charu('n');">
input type="button" value="{" onclick="charu('{');">
input type="button" value="," onclick="charu(',');">
input type="button" value="}" onclick="charu('}');">
input type="button" value="$" onclick="charu('$');">
input type="button" value="清除" onclick="qingchu();">
/p>
p>處理數(shù)據(jù):/p>
p>
textarea name="mc2" cols="88" rows="10" id="mc2" onblur="mengchi();">/textarea>
/p>
p>處理結(jié)果:/p>
p>
textarea name="mc3" cols="88" rows="10" id="mc3" onblur="mengchi();">/textarea>
/p>
p>
span id="pipei">/span>
/p>
/body>
/html>

在線測試 https://www.jb51.net/tools/zhengze.htm 
在線工具2 http://tools.jb51.net/tools/regex.asp
您可能感興趣的文章:
  • Regex Tester 正則表達式測試工具
  • Labrado RegexTool V0.5.0.0 正則表達式測試工具 英文綠色免費版
  • Regex Tester 正則表達式測試工具

標(biāo)簽:萍鄉(xiāng) 蚌埠 棗莊 江蘇 大理 廣元 衡水 衢州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《正則表達式在線測試工具》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266