|Syntactic Confectionery Delight|
Re: Regex for matching a file nameby shenme (Priest)
|on Sep 06, 2004 at 23:57 UTC||Need Help??|
First, you must explicitly limit what the variable name is that is being substituted, e.g.
otherwise you are trying to interpolate variable "$THREADx".
Then you need to make sure the '.' is matching a period. Normally a '.' in an RE is a "match anything" character. So you would need to escape the magic meaning, e.g.
Then you want the "match anything" for "any length" where you had the asterisk, e.g.
And... you might want to make sure you don't match "321xBOOM.htm" by saying the string '1' should come at the start of the string, e.g.
And you might want to wrap it up by checking that the filename _ends_ with the 'htm', e.g.
Let us know if this helps!