Currently, I'm using a Regex that grabs everything between the parentheses then just splitting on the comma. This doesn't work in the above case since there are comments after 2 of the 3 parameters. My split string ends up looking like this:
def foo(cmd ,pIncludeAll #BOOL ,pOrderByDisplayOrder #BOOL ) : try: ....
What I need is a Regex that will produce a match result that contains each of the parameters without the comment like this:
cmd pIncludeAll #BOOL pOrderByDisplayOrder #BOOL
I know I need to delimit the Regex match on commas, whitespace, and pound signs. I just don't know how to write the expression so that it will return a proper match against an arbitrary number of arguments.
cmd pIncludeAll pOrderByDisplayOrder
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.