⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsref_obj_regexp.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript RegExp Object Reference</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>


<h1>JavaScript RegExp Object Reference</h1>
<hr />

<h2>RegExp Object Methods</h2>

<p><b>FF</b>: Firefox, <b>N</b>: Netscape, <b>IE</b>: Internet Explorer</p>
<table class="ex" cellspacing="0" border="1" width="100%" id="table9">
  <tr>
    <th width="23%" valign="top" align="left">Method</th>
    <th width="65%" valign="top" align="left">Description</th>
    <th width="4%" valign="top" align="left">FF</th>
    <th width="4%" valign="top" align="left">N</th>
    <th width="4%" valign="top" align="left">IE</th>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_compile_regexp.asp">compile</a></td>
    <td valign="top">Change the regular expression (what to search for)</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_exec_regexp.asp">exec</a></td>
    <td valign="top">Search a string for a specified value. Returns the found 
	value and remembers the position</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_test_regexp.asp">test</a></td>
    <td valign="top">Search a string for a specified value. Returns true or 
	false</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  </table>
<h2>String Object Methods that supports Regular Expressions</h2>

<table class="ex" cellspacing="0" border="1" width="100%" id="table8">
  <tr>
    <th width="23%" valign="top" align="left">Method</th>
    <th width="65%" valign="top" align="left">Description</th>
    <th width="4%" valign="top" align="left">FF</th>
    <th width="4%" valign="top" align="left">N</th>
    <th width="4%" valign="top" align="left">IE</th>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_search_regexp.asp">search</a></td>
    <td valign="top">Search a string for a specified value. Returns the 
	position of the value</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_match_regexp.asp">match</a></td>
    <td valign="top">Search a string for a specified value. Returns an array of 
	the found 
	value(s)</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_replace_regexp.asp">replace</a></td>
    <td valign="top">Replace characters with other characters</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_split_regexp.asp">split</a></td>
    <td valign="top">Split a string into an array of strings</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  </table>
<br />
<hr />

<h2>RegExp Modifiers</h2>
<table class="ex" cellspacing="0" border="1" width="100%" id="table10">
  <tr>
    <th width="23%" valign="top" align="left">Property</th>
    <th width="65%" valign="top" align="left">Description</th>
    <th width="4%" valign="top" align="left">FF</th>
    <th width="4%" valign="top" align="left">N</th>
    <th width="4%" valign="top" align="left">IE</th>
  </tr>
  <tr>
    <th valign="top" colspan="5">Pattern flags</th>
    </tr>
  <tr>
    <td valign="top"><a href="jsref_regexp_modifier_i.asp">i</a></td>
    <td valign="top">Ignore the case of characters</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_regexp_modifier_g.asp">g</a></td>
    <td valign="top">Global search. Search all occurrences of the regular 
	expression in a string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
  <tr>
    <td valign="top"><a href="jsref_regexp_modifier_gi.asp">gi</a></td>
    <td valign="top">Global search, ignore case</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top">m</td>
    <td valign="top">Multiline mode. Matches occurrences over multiple lines</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <th valign="top" colspan="5">Position Matching</th>
    </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_caret.asp">^</a></td>
    <td valign="top">Get a match at the beginning of a string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_dollar.asp">$</a></td>
    <td valign="top">Get a match at the end of a string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_boundary.asp">\b</a></td>
    <td valign="top">Word boundary. Get a match at the beginning or end of a 
	word in the string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_non_boundary.asp">\B</a></td>
    <td valign="top">Non-word boundary. Get a match when it is not at the beginning or end of a 
	word in the string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_lookahead.asp">?=</a></td>
    <td valign="top">A positive look ahead. Get a match if a string is followed 
	by a specific string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_neglookahead.asp">?!</a></td>
    <td valign="top">A negative look ahead. Get a match if a string is not 
	followed by a specific string</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <th valign="top" colspan="5">Literals</th>
    </tr>
	<tr>
    <td valign="top">\0</td>
    <td valign="top">Find a NULL character</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_newline.asp">\n</a></td>
    <td valign="top">Find a new line character</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top">\f</td>
    <td valign="top">Find a form feed character</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top">\r</td>
    <td valign="top">Find a carriage return character</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top">\t</td>
    <td valign="top">Find a tab character</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top">\v</td>
    <td valign="top">Find a vertical tab character</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_ascii_octal.asp">\xxx</a></td>
    <td valign="top">Find the ASCII character expressed by the octal number 
	xxx</td>
    <td valign="top">1</td>
    <td valign="top">4</td>
    <td valign="top">4</td>
  </tr>
	<tr>
    <td valign="top"><a href="jsref_regexp_modifier_ascii_hex.asp">\xdd</a></td>
    <td valign="top">Find the ASCII character expressed by the hex number dd</td>
    <td valign="top">1</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -