Regular Expression Tester - Rob Locher
文章推薦指數: 80 %
* If you're looking for a .NET Regex tester, there's a crackerjack one here. Test String: Pattern: /. Options: /. RegularExpressionTester Thispageusestheregularexpressionparserinyourbrowser's implementationofJavaScript. Thispageshouldworkwithanybrowser thatobeystheDOM,andInternet Explorer.* Ifyou'relooking fora.NETRegextester,there'sacrackerjackone here. TestString: Pattern: / Options:/ Originalstring: Tips ExpressionMatches [abc] Asinglecharacter:a,b,orc [^abc] Anysinglecharacterbuta,b,orc [a-z] Anycharacterintherangea-z [a-zA-Z] Anycharacterintherangea-zorA-Z(anyalphabeticalcharacter) \s Anywhitespacecharacter[\t\n\r\f\v] \S Anynon-whitespacecharacter[^\t\n\r\f\v] \d Anydigit[0-9] \D Anynon-digit[^0-9] \w Anywordcharacter[a-zA-Z0-9_] \W Anynon-wordcharacter[^a-zA-Z0-9_] \b Awordboundarybetween\wand\W \B Apositionthatisnotawordboundary | Alternation:matcheseitherthesubexpressiontotheleftortotheright () Grouping:groupalltogetherforrepetitionoperators ^ Beginningofthestring $ Endofthestring Repetition OperatorMeaning {n,m} Matchthepreviousitematleastntimesbutnomorethanm times {n,} Matchthepreviousitemnormoretimes {n} Matchexactlynoccurrencesofthepreviousitem ? Match0or1occurrencesofthepreviousitem{0,1} + Match1ormoreoccurrencesofthepreviousitem{1,} * Match0ormoreoccurrencesofthepreviousitem{0,} OptionDescription g "Global"--findallmatchesinthestringratherthan justthefirst i "caseInsensitive"--ignorecharactercasewhenmatching m "Multiline"--searchovermorethanonelineifthe textcontainslinebreaks ByRobLocher *Thepreviousversionofthispage workedonlywithInternetExplorer. I'msorryifitcausedyouany inconvenience.
延伸文章資訊
- 1Regex Tester - 工具邦
- 2About Validation (Regex) - Contentstack
- 3RegExp.prototype.test() - JavaScript - MDN Web Docs
The test() method executes a search for a match between a regular expression and a specified stri...
- 4Online Regular Expression Tester:線上正規式測試驗證工具 ...
Java Regular Expression的學習筆記[精華]. 今天要介紹的其實是線上的Regular Expression Tester,. 畢竟有時候要寫code 出來測試也太麻煩了,.
- 5RegExp.prototype.test() - JavaScript - MDN Web Docs