Just wondering if anyone could help. At the minute I need to check a command line for the parameter "--date=something", I've been using the re module with python like this
cmd = "python myapp.py --name=stephen --date=20120323 --test=testthis" found = re.split (r"--date.*", cmd) print found
but this prints the entire string if it matches, or "None" if not found - how would I get it to print the "--date=20120323" part and nothing else? Or is this not possible?
Many thanks in advance,