å
çãæ£è¦è¡¨ç¾ãæ¨æºã§ã¤ãã¦ããªãã¦è
¹ç«ã¡ã¾ããBASP21ã£ã¦ã©ã¤ãã©ãªãèªã¿è¾¼ãã§ä½¿ããã ã£ã¦ãã
Â
Match
Perl5äºæã®ãã¿ã¼ã³ãããå¦çã
match = bobj.Match(regstr,target)
match [out] : ãããçµæãè¿ãã¾ãã
ï¼ ãããããªãã
ï¼ ãããã
æåå ã¡ã¿æå() ã使ã£ãã¨ãã®ãããæååã
regstr [in] : æ£è¦è¡¨ç¾æååãæåã®æåã¯ã"/" ã¾ãã¯ã"m"ã
target [in] : å¦ç対象æååã
ä¾ï¼
input = "abc1234defgã"
output = bobj.Match("/\d{4}/",input) ' 1 ãè¿ãã¾ã
output = bobj.Match("/(\d{4})/",input) ' 1234 ãè¿ãã¾ã注æï¼æ¥æ¬èªãæ±ãå ´åã¯ãæ£è¦è¡¨ç¾ã§kãªãã·ã§ã³ãæå®ãã¦ãã ããã
output = bobj.Match("/(\d{4})/k",input)
ASP.NETã§ãªãããã¬ã¼ã³ãªASPã¹ã¯ãªãããã¾ããããã ãã©ãã