mIRC Home    About    Download    Register    News    Help

Print Thread
#33586 02/07/03 08:38 AM
Joined: Jan 2003
Posts: 4
U
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2003
Posts: 4
* = any string ore blank
? = one letter not blank, and not one letter ore blank as in mirc..
i belive.


-- UnKnownD --
#33587 02/07/03 08:40 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
//if ( !? iswm ! ) { echo -a a } <-- Doesn't echo
//if ( !? iswm !a ) { echo -a a } <-- Does echo

#33588 02/07/03 06:32 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I think you're confusing Glob Matching with Regular Expressions.

Most things use globing patterns, especially when dealing with file names... as in *.* (star-dot-star), with wildcard characters of '*', '?', and sometimes '&'.

* = Any Character of Any Quantity, 0 or more.
? = Any Single Character, just 1, no more no less.
& = Any String of characters except Space/Tab/Null/Newline, eg, Any Word. I rarely see this wildcard implimented.

This is the default pattern matching mIRC uses.

Regular expressions on the other hand use '*' and '?' as Quantifiers, which may be what is confusing you. '*' works much like the Glob Star -- Any Quantity... while '?' works similar to the Glob Question-mark -- One or Zero Quantity.

Glob * == Regex .*
Glob ? == Regex .

Note that '.' means Any (single) Character in Regular Expressions, so '.*' means Any Character Any Quantity.

Hope this helps.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard