[Javascript] Searching text

Ben ben at babelfish.co.uk
Sun Mar 18 13:31:55 CST 2001


Andrew, you need to look into the indexOf method of the string object.

More info here:

	http://devedge.netscape.com/docs/manuals/js/client/jsguide/obj.htm#1008731

hth,

 .b

> -----Original Message-----
> From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
> Behalf Of Andrew Gibson
> Sent: 18 March 2001 07:39
> To: javascript at LaTech.edu
> Subject: [Javascript] Searching text
> 
> 
> Are there some good searching methods
> in Javascript...
> 
> like in ASP I might use
>  
>  if instr(mytxt,"keyword")>0 then
>    '  found a match
>  end if
> 
> In particular, I wanted to search thru a jscript
> array for a match of keywords.
> 
> Andrew
> 
> 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
> 




More information about the Javascript mailing list