1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
---
title: RegExp.input ($_)
slug: Web/JavaScript/Reference/Global_Objects/RegExp/input
tags:
- JavaScript
- Property
- Reference
- RegExp
- Regular Expressions
translation_of: Web/JavaScript/Reference/Global_Objects/RegExp/input
---
<div>{{JSRef}} {{non-standard_header}}</div>
<p>Die nicht-standarde input Propertie ist eine statische Propertie regularer Expressionen, welche die Zeichenkette, der eine reguläre Expression entgegengestellt wird, enthält. <code>RegExp.$_</code> ist ein Alias für diese Propertie.</p>
<h2 id="Syntaxis">Syntaxis</h2>
<pre class="syntaxbox"><code><var>RegExp</var>.input
RegExp.$_</code>
</pre>
<h2 id="Beschreibung">Beschreibung</h2>
<p>Die <code>input</code>-Propertie ist statisch, ist nicht eine Propertie eines einzigen Obiectes einer regulären Expression. Stattdessen nutzt man es immer als <code>RegExp.input</code> oder</p>
<p>Der Wert der <code>input</code>-Propertie wird verändert, wenn die gesuchte Zeichenkette in der regulären Expression verändert wird und diese Zeichenkette passt.</p>
<h2 id="Beispiele"><code>Beispiele</code></h2>
<h3 id="Verwendung_von_input_und__"><code>Verwendung von <code>input</code> und <code>$_</code></code></h3>
<pre class="brush: js"><code>var re = /hi/g;
re.test("hi there!");
RegExp.input; // "hi there!"
re.test("foo"); // neuer Test, unpassend
RegExp.$_; // "hi there!"
re.test("hi world!"); // neuer Test, passend
RegExp.$_; // "hi world!"
</code></pre>
<h2 id="Specificationen"><code>Specificationen</code></h2>
<p><code>Non-standard. Nicht Teil von irgendeiner laufenden Specification.</code></p>
<h2 id="Browsercompatibilität"><code>Browsercompatibilität</code></h2>
<div><code>{{CompatibilityTable}}</code></div>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th><code>Feature</code></th>
<th><code>Chrome</code></th>
<th><code>Firefox (Gecko)</code></th>
<th><code>Internet Explorer</code></th>
<th><code>Opera</code></th>
<th><code>Safari</code></th>
</tr>
<tr>
<td><code>Basisunterstützung</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th><code>Feature</code></th>
<th><code>Android</code></th>
<th><code>Chrome for Android</code></th>
<th><code>Firefox Mobile (Gecko)</code></th>
<th><code>IE Mobile</code></th>
<th><code>Opera Mobile</code></th>
<th><code>Safari Mobile</code></th>
</tr>
<tr>
<td><code>Basisunterstützung</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
<td><code>{{CompatVersionUnknown}}</code></td>
</tr>
</tbody>
</table>
</div>
<h2 id="Siehe_auch"><code>Siehe auch</code></h2>
<ul>
<li><code>{{non-standard_inline}} {{jsxref("RegExp.lastMatch", "RegExp.lastMatch ($&)")}}</code></li>
<li><code>{{non-standard_inline}} {{jsxref("RegExp.lastParen", "RegExp.lastParen ($+)")}}</code></li>
<li><code>{{non-standard_inline}} {{jsxref("RegExp.leftContext", "RegExp.leftContext ($`)")}}</code></li>
<li><code>{{non-standard_inline}} {{jsxref("RegExp.rightContext", "RegExp.rightContext ($')")}}</code></li>
<li><code>{{non-standard_inline}} {{jsxref("RegExp.n", "RegExp.$1-$9")}}</code></li>
</ul>
|