正则表达式
在项目中用到的一小点正则表达式:在下面这个字符串中找出想要的子串:
字符串:@StartInsuranceDate=2008-09-12@RegisterDate=1999-09-13@Year=9.00547945205479@UsageType=1@SeatCount=5@NewCarPrice=15@GlassType=1@CarDamageInsurance=150000.00
@ThirdPerson=2@Driver=10000.00@Passenger=10000.00@PassengerCount=4@StealRob=71100.00@SelfBurn=71100.00@GlassBreak=150000
@ForceInsurance=1050@ForceAlterRateFlag=3@OtherInsuranceName=@OtherInsurance=0@CarBoadTax=0
用 MatchCollection matchs = Regex.Matches(InsureBase, @"@CarDamageInsurance=\d*\.*\d*");
找到@CarDamageInsurance=150000.00。