Post Reply 
(71B) Wildcard pattern matching, directory listing
04-17-2021, 03:42 AM
Post: #5
RE: (71B) Wildcard pattern matching, directory listing
(04-17-2021 01:55 AM)rprosperi Wrote:  Seems to me that you could step through any real world file list just using CAT and [v] in less keystrokes than invoking that CALL MATCH... command line, lol.

Still, it looks interesting and I'll likely give it a whirl, just for the experience.

Thanks for sharing this Dave. Smile

Yeah, the DIR sub is just one very simple example with questionable utility, it can have other more meaningful uses. Smile Might be useful for reading and filtering lines out of a text file, for instance.

I don't know that I'd attempt to make a whole regex engine in BASIC, but I might add some other features to this. The ability to match character classes as with the LIKE operator in SQL Server would be neat, e.g. '[0-9][0-9]*' to match strings beginning with a pair of numbers. Could just expand the class into a string that's tested with POS() or something.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (71B) Wildcard pattern matching, directory listing - Dave Britten - 04-17-2021 03:42 AM



User(s) browsing this thread: 1 Guest(s)