Use variable in regular expression

2007-08-02 Thread CarpeSkium
I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. I am using yesterday's date to find all of my data from yesterday. Yesterday's date is 20070731, and assigned to the variable yesterday_date. I want to loop thru a

Re: Use variable in regular expression

2007-08-02 Thread Antti Rasinen
On 2007-08-02, at 13:43, [EMAIL PROTECTED] wrote: I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. I am using yesterday's date to find all of my data from yesterday. Yesterday's date is 20070731, and assigned to

Re: Use variable in regular expression

2007-08-02 Thread vbr
... 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.

Re: Use variable in regular expression

2007-08-02 Thread Sion Arrowsmith
[EMAIL PROTECTED] wrote: I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. You're coming from a Perl background, right? No-one else would think of using a regexp for such a simple thing. There are two things you need

Re: Use variable in regular expression

2007-08-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. I am using yesterday's date to find all of my data from yesterday. Yesterday's date is 20070731, and assigned to the variable

Re: Use variable in regular expression

2007-08-02 Thread Steve Holden
[when replying to a mailing list or newsgroup response please make sure you include the list as a recipient, so the whole conversation is available] André Martins wrote: I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of

Re: Use variable in regular expression

2007-08-02 Thread André Martins
I know I can use a variable in regular expressions. I want to use a regex to find something based on the beginning of the string. I am using yesterday's date to find all of my data from yesterday. Yesterday's date is 20070731, and assigned to the variable yesterday_date. I want to loop thru a