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
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
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
Acorn Arcade forums: 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: 255
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 ]
 

Acorn Arcade forums: Programming: Universal wildcard implementation?