regex_match function - IBM
文章推薦指數: 80 %
execute function regex_match ('Regex module' , '[Mm]odule|DataBlade'); (expression) t. In the following example, the regular expression 'wo[ou]l?d' matches ... IBM®Informix®12.10 regex_matchfunction Theregex_matchfunctionreturnsindicateswhetherasourcestring matchestheregularexpression. Syntax regex_match( strlvarchar, relvarchar, coptsintegerDEFAULT1) returnsboolean regex_match( strclob, relvarchar, coptsintegerDEFAULT1) returnsboolean Parameters str Thestringtosearch.CanbeoftypeCHAR,NCHAR,VARCHAR,NVARCHAR,LVARCHARorCLOB.Anull valueistreatedasanemptystring. re Theregularexpression.CanbeoftypeCHAR,NCHAR,VARCHAR,NVARCHAR,orLVARCHAR.Cannotbe null. copts(Optional) Thetypeofregexsearch:0=Basicregex 1=Default.ExtendedPOSIXregex 2=Basicregexandignorecase 3=ExtendedPOSIXregexandignorecase Description Usetheregex_matchfunctiontodetermineifthesourcestringmatchesthe regularexpression. Returns t=Thesourcestringmatchestheregularexpression. f=Thesourcestringdoesnotmatchtheregularexpression. Anexception=Anerroroccurred. Example Thefollowingstatementtestswhethertheword"module","Module",or"DataBlade"occursinthe string:executefunctionregex_match ('Regexmodule','[Mm]odule|DataBlade'); (expression)t Inthefollowingexample,theregularexpression'wo[ou]l?d'matchestheword "wood"andtheword "would":selectid,twister fromtongue_twisters whereregex_match(twister,'wo[ou]l?d'); id286 twisterIftwowitcheswouldwatchtwowatches,whichwitch wouldwatchwhichwatch? id335 twisterHowmuchwoodcouldawoodchuckchuckifa woodchuckcouldchuckwood?Awoodchuck couldchuckasmuchwoodasawoodchuckwould chuckifawoodchuckcouldchuckwood. Parenttopic:RegexRoutines Examplesexchange| Troubleshooting TofindthePDF,seePublicationsfortheIBMInformix12.10familyofproducts. Forthereleasenotes,documentationnotes,and/ormachinenotes,seetheReleaseNotespage.
延伸文章資訊
- 1<regex> functions - Microsoft Docs
regex_match, Tests whether a regular expression matches the entire ... Example. C++. Copy. // std...
- 2A Beginner's Guide to Alteryx: How to Use Regular Expressions
- 3C++ Regex Library - regex_match - Tutorialspoint
C++ Regex Library - regex_match, It returns whether the target sequence matches the regular expre...
- 4C++11 嘴砲:Regular Expression 正規表示式
匹配你要的字串(regex_search, regex_match). 看個例子我相信大家就會懂了:. regex_search_match.cpp. #include <regex> ...
- 5Regex.Match 方法(System.Text.RegularExpressions)
在指定的輸入字串中,搜尋符合Regex 建構函式中所指定規則運算式的第一個項目。 ... RegularExpressions; class Example { static void Main...