Tad Anhalt wrote: > ? - allow one (optional). > + - one required, allow additional (optional) > > ?+ seems nonsensical. allow one (optional), one required, allow > additional (optional)? Require one (optional) allow additional? One > what? I don't know where you're getting this from. The description seems reasonably clear to me (although * apparently doesn't work the way I interpreted it). ? matches any one character except newline, and + matches one or more occurrances of the previous character. Therefore ?+ matches any string of one or more characters up to the next newline. I've tried it and that does in fact work. > ?,+, * and {x,y} (range) are usually grouped together as quantifiers. > They need something before them to use in the match. Again, this is contrary to the documentation and how it appears to work. Where are you getting this from? > I guess it wouldn't suprise me if some implementations ... I've only ever used the one version (10.20c), so all I can go by is the help for that version. So you are saying this was significantly different in previous versions? > Would 5* mean "any > number of 5's (including zero)" or would it mean "5 followed by any > characters at all?" The latter, at least that's how I interpret the documentation. > I wouldn't count on the behavior you are seeing being portable. Of course not. Why would I? I've used enough editors to know that each has their own details in this area. For example, the Apollo editor used * to indicate 0 or more repetitions of the previous character whereas on many other systems it is a wildcars string match. > Have you tried .+ yet? No, why? That would match one or more consecutive periods. How is this remotely relevant to the problem? > In a great deal (most?) of the regex libraries, "." will match any > (single) character, "*" will match zero or more instances of the > _previous_ character (or grouped expression) and "+" will match one or > more instances of the _previous_ character (or grouped expression). > > One problem you may run into is if "." happens to match newline. On > some implementations it does. > > . - Match any (one) character. Possibly newline, but probably not. > .? - Match zero or one instance of any character. > .+ - Match one or more instance of any character. > .* - Match almost anything. (zero or more instances of any char) > .{2,5} - Match minimum of 2 or max of 5 instances of any char. Speculating how other systems might implement this is pointless. We're not talking about other systems. We are talking about UltraEdit specifically with "Unix style" regular expressions turned off. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist