阅读背景:

用于匹配括号中值的正则表达式/ Javascript

来源:互联网 

My web application needs to parse numeric ranges in strings that are enclosed by parenthesis. I've never really understood regex properly so I need some assistance. The code below is kind of what I'm looking to do (I'll then split the string on the hyphen and get the min/max values). Obviously the pattern is wrong - the example below alerts "(10-12) foo (5-10) bar" when my desired result is 1 alert saying (10-12) and the next saying (5-10), or better yet those values without the parenthesis if that's possible.My web application needs to parse numeric range




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: