[英]How to put more than one or condition in regex
Below are the cases to cover using regular expression: 以下是使用正则表达式涵盖的情况:
Case 1: (3) x 4.5 mL Red Top Tubes. 情况1: (3)x 4.5 mL红顶管。
Case 2: (3) 4mL Red Top Tubes. 情况2: (3)4mL红顶管。
Case 3: (3)- 4mL Red Top Tubes. 情况3: (3)-4mL红顶管。
I have created regular expression to cover all these above cases: 我创建了正则表达式来涵盖上述所有情况:
But it is not working for ' Case 3 ' where separator is '-' 但不适用于分隔符为“-”的“ 案例3 ”
(\(([^)]+)\)(?:\s*x\s*|\s*|-)(\d*\.\d+|\d+)\s*ml\s([\w\s]+)[,\;\and\s]*)
Thanks in advance !! 提前致谢 !!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.