log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
- South-West Show 2024 talks (News:4)
- February 2024 News Summary (News:1)
- Next developer fireside chat (News:)
- DDE31d released (News:)
- South-West Show 2024 Report (News:)
- South-West Show 2024 in pictures (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: Universal wildcard implementation?
 
  Universal wildcard implementation?
  swirlythingy (14:23 25/5/2011)
  helpful (16:58 25/5/2011)
  Lampi (08:52 26/5/2011)
 
Martin Bazley Message #117819, posted by swirlythingy at 14:23, 25/5/2011

Posts: 460
I've been toying with the idea of adding wildcard support to MBBack for a while (although probably not in this release), but AFAICT I'll need direct access to the OS wildcard routine itself (# for one character, * for many), because although OS_GBPB accepts wildcards, OS_SpriteOp doesn't.

So, was there ever an API for a simple string-matching routine to see if a non-wildcarded string was valid according to a wildcarded one? Or did any third parties write one? Or does anyone have any idea how to write my own?
  ^[ Log in to reply ]
 
Bryan Hogan Message #117820, posted by helpful at 16:58, 25/5/2011, in reply to message #117819
Member
Posts: 249
The RegEx module might be what you need:

http://www.fnxweb.com/software-acorn-regex.html
  ^[ Log in to reply ]
 
James Lampard Message #117830, posted by Lampi at 08:52, 26/5/2011, in reply to message #117819
Lampi

Posts: 190
There is an implementation of a wildcard routine in JFShared:

REM Wildcard based on that in Acorn's CopyFiles
DEFFNwildcard(test$,wild$)
IFtest$<>""ELSEIFASCwild$=ASC"*"THEN=FNwildcard(test$,MID$(wild$,2))ELSE=(wild$="")
IFwild$=""THEN=0
IF ASCtest$=ASCwild$ ORASCwild$=ASC"#"THEN=FNwildcard(MID$(test$,2),MID$(wild$,2))
IFASCwild$<>ASC"*"THEN=0
=FNwildcard(test$,MID$(wild$,2))ORFNwildcard(MID$(test$,2),wild$)
  ^[ Log in to reply ]
 

The Icon Bar: Programming: Universal wildcard implementation?