Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.11.20;
Скачать: CL | DM;

Вниз

Небольшой и срочный вопрос по JavaScritp   Найти похожие ветки 

 
Spruting   (2005-10-30 15:16) [0]

Здравствуйте. Как проверить, есть в перемнной stroka подстрока abc?


 
easy ©   (2005-10-30 16:33) [1]

search Method

Description
Searches a string for matches to a regular expression.

Syntax
stringObj.search(rgexp)

The search method syntax has these parts:

stringObj Required. The String object or literal to search.
rgexp Required. A Regular Expression object containing the pattern to search for.

The following example illustrates the use of the search method:

function SearchDemo()
{
 var r, re;
 var s = "The quick brown fox jumped over the lazy yellow dog.";
 re = /fox/i;
 r = s.search(re);
 return(r);
}


 
Spruting   (2005-10-30 17:16) [2]

А откуда это?

Как я понимаю,функция вернет true, если набор символов fox есть в строке s?


 
DiamondShark ©   (2005-10-30 17:28) [3]

if (stroka.indexOf("abc") >= 0) ...



Страницы: 1 вся ветка

Текущий архив: 2005.11.20;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.052 c
11-1104391392
Lars
2004-12-30 10:23
2005.11.20
Pstream.Save2File


4-1127217125
Sesh
2005-09-20 15:52
2005.11.20
ReadOnly в Приложении


2-1131118453
Yus
2005-11-04 18:34
2005.11.20
ReadFile


2-1130440338
KaTH
2005-10-27 23:12
2005.11.20
массивы в делфи


2-1130424110
zaN0za
2005-10-27 18:41
2005.11.20
Вопрос по потокам