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.
延伸文章資訊
- 1C++ regex Tutorial: Regular Expressions In C++ With Examples
- 2regex_match - C++ Reference
- 3C++ Regex Library - regex_match - Tutorialspoint
C++ Regex Library - regex_match, It returns whether the target sequence matches the regular expre...
- 4regex_replace() | Regex (Regular Expression) In C++ ...
std::regex_match, std::regex_replace() | Regex (Regular Expression) In C++ · regex_match() -This ...
- 5A Beginner's Guide to Alteryx: How to Use Regular Expressions