Regular expression of climbing weather forecast [prototype] (来 字 ww.yesur.com)

xiaoxiao2021-03-06  64

// Test regex string content = "; string outhtml ="; regex regex; match mc; streamreader sr = new streamreader ("c: //a.txt", system.text.encoding.Getencoding ("GB2312") ); Content = sr.readToend (); content = content.replace ("/", "'"; // Start with the regular expression to take a picture file name

// regex = new regex ("Class = /" TEXT02 / "> (? . *) "); regex = new regex (@ "(@) (/ s *) (? . *) (/ s *) (/ s *) (/ s *) (? . *) (/ s *) ", regexoptions.compiled;

Outhtml = "

"; OUTHTML = " TEST "; for (mc = regex.match (Content); mc.success; mc = mc.nextMatch ()) {OUTHTML = "
City: " mc.groups ["cityname"]. Value " mc.groups ["Weather"]. Value " ";} Outhtml = "";

Response.write (OUTHTML);

*****************************

The key to the key is:

must be represented by (/ s *), this means an unlimited space, otherwise does not match, COOL

转载请注明原文地址:https://www.9cbs.com/read-85703.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.057, SQL: 9