Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!udel!mmdf From: MROBINSON@wash-vax.bbn.com Newsgroups: comp.sys.amiga Subject: pattern matching library for 1.4 Message-ID: <12314@louie.udel.EDU> Date: 5 Apr 89 02:59:09 GMT Sender: mmdf@udel.EDU Lines: 33 I've seen lots of talk about a library for filename pattern matching support in 1.4, but none about supporting pattern matching in strings! I personally would like to see, IN ADDITION to the previously mentioned filename "parameter expansion" support, a supported call like find_pattern_in_string(pattern,plen,string,slen,match_start,match_len) char *pattern; int plen; char *string; int slen; int *match_start, *match_len; The idea here is, since the AmigaDOS filename pattern matching capabilities are a powerful syntax for matching patterns in ANY kind of strings, why not make it easy for people to write editors and the like that will all use the same pattern matching syntax? For the above C function (which would return an int, either TRUE or FALSE based on whether a match to pattern existed in string), please do NOT assume pattern or string is null-terminated (since then how could one match a pattern with a \0 in it). match_start would be an offset from string for where the match found starts, and match_len is of course the length of the matching string. Perhaps having a standard string pattern matching syntax for all applications would make it clearer to unix (or domain, or VMS) lovers that the syntax really isn't difficult to use, eh Commodore? --Max Robinson (no, not the dead one) I am giving my opinion, I don't know who else agrees with me.