我有一个包含该值如何使用javascript
<AirportCode>LKO</AirportCode> <CityOrAirportName>LUCKNOW AMAUSI</CityOrAirportName> <Country>India</Country> <CountryAbbrviation>IN</CountryAbbrviation> <CountryCode>733</CountryCode> <GMTOffset>-5.5</GMTOffset> <RunwayLengthFeet>7835</RunwayLengthFeet>
我怎样才能提取此国家代码,在这种情况下,733国家代码可以是不同的变量,从字符串中提取的值,所以我需要以某种方式获取CountryCode标记内的值
人们可能不同意,但在这样的简单情况下使用正则表达式可能会好吗? – Robin
@Robin这很好。 –