<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_Tutorial%2FRegular_Expressions%2FIntroduction</id>
		<title>JavaScript Tutorial/Regular Expressions/Introduction - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=JavaScript_Tutorial%2FRegular_Expressions%2FIntroduction"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Regular_Expressions/Introduction&amp;action=history"/>
		<updated>2026-04-04T12:47:12Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_Tutorial/Regular_Expressions/Introduction&amp;diff=9877&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Regular_Expressions/Introduction&amp;diff=9877&amp;oldid=prev"/>
				<updated>2010-05-26T08:25:31Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 08:25, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=JavaScript_Tutorial/Regular_Expressions/Introduction&amp;diff=9876&amp;oldid=prev</id>
		<title> в 18:52, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=JavaScript_Tutorial/Regular_Expressions/Introduction&amp;diff=9876&amp;oldid=prev"/>
				<updated>2010-05-25T18:52:57Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== All the characters that require a backslash character to be taken literally within a pattern.==&lt;br /&gt;
&lt;br /&gt;
Character&lt;br /&gt;
Description&lt;br /&gt;
\f&lt;br /&gt;
Form feed&lt;br /&gt;
\n&lt;br /&gt;
Newline&lt;br /&gt;
\r&lt;br /&gt;
Carriage return&lt;br /&gt;
\t&lt;br /&gt;
Tab&lt;br /&gt;
\v&lt;br /&gt;
Vertical tab&lt;br /&gt;
\/&lt;br /&gt;
Forward slash (/)&lt;br /&gt;
\\&lt;br /&gt;
Backward slash (\)&lt;br /&gt;
\.&lt;br /&gt;
Period (.)&lt;br /&gt;
\*&lt;br /&gt;
Asterisk (*)&lt;br /&gt;
\+&lt;br /&gt;
Plus (+)&lt;br /&gt;
\?&lt;br /&gt;
Question Mark (?)&lt;br /&gt;
\|&lt;br /&gt;
Horizontal bar (|)&lt;br /&gt;
\(&lt;br /&gt;
Left parenthesis (&lt;br /&gt;
\)&lt;br /&gt;
Right parenthesis )&lt;br /&gt;
\[&lt;br /&gt;
Left bracket ([)&lt;br /&gt;
\]&lt;br /&gt;
Right bracket (])&lt;br /&gt;
\{&lt;br /&gt;
Left curly brace ({)&lt;br /&gt;
\}&lt;br /&gt;
Right curly brace (})&lt;br /&gt;
\XXX&lt;br /&gt;
ASCII character represented by the octal number XXX&lt;br /&gt;
\xHH&lt;br /&gt;
ASCII character represented by the hexadecimal number HH&lt;br /&gt;
\cX&lt;br /&gt;
The control character represented by X&lt;br /&gt;
&lt;br /&gt;
== Defining Patterns==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are special characters for creating almost any pattern.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Special Pattern Matching Characters&amp;lt;/p&amp;gt;&lt;br /&gt;
Character&lt;br /&gt;
Description&lt;br /&gt;
\w&lt;br /&gt;
Matches any word character (alphanumeric).&lt;br /&gt;
\W&lt;br /&gt;
Matches any non-word character.&lt;br /&gt;
\s&lt;br /&gt;
Matches any whitespace character (tab, newline, carriage return, form feed, vertical tab).&lt;br /&gt;
\S&lt;br /&gt;
Matches any non-whitespace character.&lt;br /&gt;
\d&lt;br /&gt;
Matches any numerical digit.&lt;br /&gt;
\D&lt;br /&gt;
Matches any character that is not a number.&lt;br /&gt;
[\b]&lt;br /&gt;
Matches a backspace.&lt;br /&gt;
.&lt;br /&gt;
Matches any character except a newline.&lt;br /&gt;
[...]&lt;br /&gt;
Matches any one character within the brackets.&lt;br /&gt;
[^...]&lt;br /&gt;
Matches any one character not within the brackets.&lt;br /&gt;
[x-y]&lt;br /&gt;
Matches any character in the range of x to y.&lt;br /&gt;
[^x-y]&lt;br /&gt;
Matches any character not in the range of x to y.&lt;br /&gt;
{x,y}&lt;br /&gt;
Matches the previous item at least x times but not to exceed y times.&lt;br /&gt;
{x,}&lt;br /&gt;
Matches the previous item at least x times.&lt;br /&gt;
{x}&lt;br /&gt;
Matches the previous item exactly x times.&lt;br /&gt;
?&lt;br /&gt;
Matches the previous item once or not at all.&lt;br /&gt;
+&lt;br /&gt;
Matches the previous item at least once.&lt;br /&gt;
*&lt;br /&gt;
Matches the previous item any number of times or not at all.&lt;br /&gt;
|&lt;br /&gt;
Matches the expression to the left or the right of the | character.&lt;br /&gt;
(...)&lt;br /&gt;
Group everything inside parentheses into a subpattern.&lt;br /&gt;
\x&lt;br /&gt;
Matches the same characters that resulted from the subpattern in group number x. Groups, which are designated with parentheses, are numbered from left to right.&lt;br /&gt;
^&lt;br /&gt;
Matches the beginning of the string or beginning of a line, in multiline matches.&lt;br /&gt;
$&lt;br /&gt;
Matches the end of the string or end of a line, in multiline matches.&lt;br /&gt;
\b&lt;br /&gt;
Matches the position between a word character and a non-word character.&lt;br /&gt;
\B&lt;br /&gt;
Matches the position that is not between a word character and a non-word character.&lt;br /&gt;
&lt;br /&gt;
== Pattern Attributes==&lt;br /&gt;
&lt;br /&gt;
Character&lt;br /&gt;
Description&lt;br /&gt;
g&lt;br /&gt;
Global match. Find all possible matches.&lt;br /&gt;
i&lt;br /&gt;
Make matching case-insensitive.&lt;br /&gt;
&lt;br /&gt;
== Pattern Matching==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;JavaScript uses the RegExp (short for Regular Expression) object to handle pattern matching.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The RegExp object can be created in two different ways.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The first way is to use the RegExp constructor and the keyword new:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var lastName = new RegExp(&amp;quot;ABC&amp;quot;);&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
== Testing for Pattern Matches==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The pattern matching methods in the String object require RegExp objects.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Pattern Matching Methods in the String Object&amp;lt;/p&amp;gt;&lt;br /&gt;
Method&lt;br /&gt;
Description&lt;br /&gt;
match(regExpObj)&lt;br /&gt;
Searches for regExpObj pattern in string and returns result.&lt;br /&gt;
replace(reqExpObj,str)&lt;br /&gt;
Replaces all occurrences of the regExpObj pattern with str.&lt;br /&gt;
search(reqExpObj)&lt;br /&gt;
Returns the position of matching regExpObj pattern within the string.&lt;br /&gt;
split(regExpObj,max)&lt;br /&gt;
Splits string everywhere there is a matching regExpObj pattern up to max splits. The substrings are returned in an array.&lt;br /&gt;
&lt;br /&gt;
== The pattern matching methods in the RegExp object require String objects.==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Pattern Matching Methods in the RegExp Object&amp;lt;/p&amp;gt;&lt;br /&gt;
Method&lt;br /&gt;
Description&lt;br /&gt;
exec(str)&lt;br /&gt;
Searches for pattern in str and returns result&lt;br /&gt;
test(str)&lt;br /&gt;
Searches for pattern in str and returns true if match found, otherwise false is returned&lt;br /&gt;
(str)&lt;br /&gt;
Same as exec(str) method&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;SCRIPT LANGUAGE=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
    var str = &amp;quot;A BC 5 DEF 135 Abc.&amp;lt;BR&amp;gt;&amp;quot;&lt;br /&gt;
    var span3to5 = new RegExp(&amp;quot;[3-5]&amp;quot;,&amp;quot;g&amp;quot;);&lt;br /&gt;
    document.write(str);&lt;br /&gt;
    document.write(&amp;quot;Replace digits 3 to 5 with nines.&amp;lt;BR&amp;gt;&amp;quot;);&lt;br /&gt;
    document.write(str.replace(span3to5,&amp;quot;9&amp;quot;));&lt;br /&gt;
    //--&amp;gt;&lt;br /&gt;
&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>