... > Yesterday's date is 20070731, and assigned to the variable > "yesterday_date". I want to loop thru a directory and find all of the > yesterday's data ONLY IF the feature class has the date at the > BEGINNING of the filename. ... > I can't figure out the > syntax of inserting the "^" into the regex. > ... e.g.
yesterdayRE = re.compile("^"+yesterday_date) ... should work (assuming yesterday_date is a string), but for that simple tests you may also try e.g. filename.startswith(yesterday_date) (with both filename and yesterday_date being strings). Greetings, Vlasta -- http://mail.python.org/mailman/listinfo/python-list