Reputation: 141
Below are the cases to cover using regular expression:
Case 1: (3) x 4.5 mL Red Top Tubes.
Case 2: (3) 4mL Red Top Tubes.
Case 3: (3)- 4mL Red Top Tubes.
I have created regular expression to cover all these above cases:
But it is not working for 'Case 3 ' where separator is '-'
(\(([^)]+)\)(?:\s*x\s*|\s*|-)(\d*\.\d+|\d+)\s*ml\s([\w\s]+)[,\;\and\s]*)
Thanks in advance !!
Upvotes: 0
Views: 41