On Aug 09, 2006, at 21:44 UTC, Robert Poland wrote: > I'm trying to check editfield1.text for a Saturday, If it doesn't > exist then call a msgbox.
if InStr( EditField1.Text, "Saturday" ) = 0 then MsgBox "Nope!" > This is as far as I have gotten so far; > > dim re as regex > dim match as RegExMatch > dim x as boolean=false > // editfield1.text="Saturday" > re=new regex > re.SearchPattern="Saturday" > match=re.Search(editfield1.text,1) Using a RegEx for this is serious overkill. But if you insist... > x=match as boolean ..then this line should be: if match <> nil then x = true Or if you like brevity, make it: x = (match <> nil) Or, ditch x altogether and just do: if match is Nil then editfield2.text = "it's not there" else editfield2.text = "it's there" end if But I say ditch the RegEx too, and either use InStr, or grab the StringUtils module from <http://www.verex.com/opensource/> so you can just say: if EditField1.text.Contains("Saturday") then... Cheers, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>