#71674 - 2002-11-21 02:04 AM
In reference to LIKE2 UDF
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Crazy Eddie Since the UDF forum is for the actual UDF and not discussion I'm posting here to discuss it.
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000217
LIKE2("ron", "r?n")
returns a 0 for me. Am I using it incorrectly?
LIKE2("ron", "ron") returns a 1 for me
Or do I need to set my parse character to the question mark?
|
|
Top
|
|
|
|
#71675 - 2002-11-21 08:20 PM
Re: In reference to LIKE2 UDF
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Hmmm... Crazy Eddie elected not to allow us to PM him, and listed no other email address
He also apparently has not seen this post either.
i.e. His UDF LIKE2 LIKE2 UDF
Does not appear to work for me, or I'm using it incorrectly. [ 21. November 2002, 20:22: Message edited by: NTDOC ]
|
|
Top
|
|
|
|
#71676 - 2002-11-21 10:59 PM
Re: In reference to LIKE2 UDF
|
maciep
Korg Regular
   
Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
|
NTDOC,
FYI, I think you need to use an '*' for a wildcard instead of a '?'.
More importantly I found some logical errors with this function anyway. The following function calls both returned 1 for me.
LIKE2("Edward is very cool, extra stuff, ", "Ed*w*rd *COOL") LIKE2(", extra stuff, Edward is very cool", "Ed*w*rd *COOL")
Both calls should actually return 0. If the wildcard string does not begin and/or end with a wildcard, then the other string must begin and/or end with exactly the same as the wildcard.
For example, the following returns 1.
? LIKE2("executable.exe", "cu*.exe")
which could be devastating in the wrong situation.
-Eric
_________________________
Eric
|
|
Top
|
|
|
|
#71682 - 2002-11-25 09:47 PM
Re: In reference to LIKE2 UDF
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1821 anonymous users online.
|
|
|