Extracting a substring using regular expression matching - IBM

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

You can use regular expression matching to retrieve a single substring or all substrings from a string. To extract a single substring, you use the RExtract ... IBMTivoliNetcool/Impact,Version6.1.0.4. Extractingasubstringusingregularexpressionmatching Youcanuseregularexpressionmatchingtoretrieveasingle substringorallsubstringsfromastring. Toextractasinglesubstring,youusetheRExtractfunction. TheRExtractfunctiontakesastringandaregular expressionspatternasinputparameters.Itreturnsthefirstmatching substringthatitfindsinthestring. Toextractallmatchingsubstrings,youusetheRExtractAllfunction. AswithRExtract,TheRExtractAllfunction takesastringandaregularexpressionspatternasinputparameters. Itreturnsanarraythatcontainsallthematchingsubstrings.



請為這篇文章評分?