Regular Expression Tester - Rob Locher

文章推薦指數: 80 %
投票人數:10人

* 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.



請為這篇文章評分?