我使用C#Regex从我的输入中找到所有“http:// .....”。 这是我的代码,但我没有找到任何东西。请告诉我我错过了什么?“http *”正则表达式与URL匹配
Match m = Regex.Match(input, "http* ");
while (m.Success)
{
Console.WriteLine("'{0}' found at index {1}.",
m.Value, m.Index);
m = m.NextMatch();
}
这是我输入文本(为了便于阅读):
I recently moved and have a buI recently moved and have a bunch of stuff for sale.
Most prices are based on my research from CL and ebay. Let me know or make an offer
if you like something from the list. Thanks. IKEA RAMBERG bed frame and Sultan
mattress - $150 http://seattle.craigslist.org/est/fuo/4688883554.html Sanus Platinum
Foundations TV Stand - $75 http://seattle.craigslist.org/est/fuo/4687613962.html
Staples Mission Coffee table and 2 sets of nesting/side tables - $90
http://seattle.craigslist.org/est/fuo/4687499215.html
Like new Hoover SteamVac Carpet Cleaner with Clean Surge, F5914900 - $100
http://seattle.craigslist.org/est/hsh/4687474666.html Hauppauge WinTV-HVR-1600
ATSC/NTSC/QAM Tuner Video Card + Remote - $35
http://seattle.craigslist.org/est/sop/4687372003.html Computer with core 2 quad, 2GB
RAM, nforce MB, 1.5TB HDD and more - $200 http://seattle.craigslist.org/est/sys/4687362266.html
LINKSYS CM100 Cable Modem (works with Comcast) - $15
http://seattle.craigslist.org/est/ele/4687639722.html Various computer parts for sale - $1 I
recently moved and have a buI recently moved and have a bunch of stuff for sale. Most prices
are based on my research from CL and ebay. Let me know or make an offer if you like something
from the list. Thanks. IKEA RAMBERG bed frame and Sultan mattress - $150
http://seattle.craigslist.org/est/fuo/4688883554.html Sanus Platinum Foundations TV Stand - $75
http://seattle.craigslist.org/est/fuo/4687613962.html Staples Mission Coffee table and 2 sets of
nesting/side tables - $90 http://seattle.craigslist.org/est/fuo/4687499215.html Like new Hoover
SteamVac Carpet Cleaner with Clean Surge, F5914900 - $100
http://seattle.craigslist.org/est/hsh/4687474666.html Hauppauge WinTV-HVR-1600 ATSC/NTSC/QAM
Tuner Video Card + Remote - $35 http://seattle.craigslist.org/est/sop/4687372003.html Computer
with core 2 quad, 2GB RAM, nforce MB, 1.5TB HDD and more - $200
http://seattle.craigslist.org/est/sys/4687362266.html LINKSYS CM100 Cable Modem (works with
Comcast) - $15 http://seattle.craigslist.org/est/ele/4687639722.html Various computer parts for
sale - $1 "
您缺少点。 – 2014-09-29 17:12:58