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
- RISC OS Open Ltd at ROUGOL (Gen:1)
- Silicon Dreams Festival (News:1)
- Archimedes Software Preservation Project (Gen:130)
- Totoro! Totoro! Totoro! (PP:95)
- 32bit SWI handler (Prog:5)
- Not with a bang but a whimper, RISCOS Ltd (Gen:86)
- Euclid (Gen:28)
- Best web browser with OS3.70 (Gen:2)
- CD-Rom Problems with RPC600 (Gen:10)
- RISCOS versions and features (Gen:33)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
Site Search
 
Article archives
Acorn Arcade forums: Programming: Universal wildcard implementation?
 
  Universal wildcard implementation?
  swirlythingy (15:23 25/5/2011)
  helpful (17:58 25/5/2011)
  Lampi (09:52 26/5/2011)
 
Martin Bazley Message #117819, posted by swirlythingy at 15:23, 25/5/2011

Posts: 440
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 17:58, 25/5/2011, in reply to message #117819
Member
Posts: 136
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 09:52, 26/5/2011, in reply to message #117819
Lampi

Posts: 188
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 ]
 

Acorn Arcade forums: Programming: Universal wildcard implementation?