A file skeleton does not have the p ower of a "regular expression". You can use a question mark (?) to replace a single character, and an asterisk (*) for any number of characters.
For more sophisticated handling, I would return too many files (for example, "*.app"), and let VFP analyze whether the filename meets your criteria.
>Hi,
>May I know the file skeleton that able to find these files using ADIR()?
>
>1. MYPREFIX-MYTOPIC.APP
In this example, and the following ones, it is not clear to me what part is a variable, and what part is constant. If it is a constant, just use:
"myprefix-mytopic.app"
for the file skeleton. Assuming (for example) that both "Myprefix" and "MyTopic" are variable,s you could also create a variable for the skeleton:
skeleton = MyPrefix + "-" + MyTopic + ".app"
lnFileCount = adir(skeleton)
>2. MYPREFIX{space}{space}-MYTOPIC.APP
skeleton = MyPrefix + " -" + MyTopic + ".app"
>3. MYPREFIX-MYTOPIC2.APP
>4. MYPREFIX{space}{space}-MYTOPIC2.APP
Adding a single question mark will match both files with, and without, an additional character at the end.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)