I am trying to use regular expression to parse command line argument. Now, for this specific type of command line argument the user have the flexibility to enter the string in either of these forms:
[Cent_acc_00.txt, Cent_acc_00.txt, 0.02, cm/s2, 20, 120]
[Cent_acc_00, Cent_acc_00, 0.02, cm/s2, 20]
The regular expression command that I have used is:
eq_2 = re.findall("\[[\w\-\.]+[txtcsv\S], [\w\-\.]+[txtcsv\S], [0-9\.]+, [\w/]+, [0-9\.]+([,\s]+[0-9\.]+|)]",eq)
It's showing correctly in regular expression search bar in VS code, however, it is failing to match while used in python.