JavaScript çok satırlı Özellik
Örnek
let text = "Visit W3Schools!";
let pattern = /W3S/gi; // "g" and "i" is set, "m" is not.
let result = pattern.multiline;
Tanım ve Kullanım
multiline özelliği, m değiştiricisinin ayarlanıp ayarlanmadığını belirtir.
Bu özellik, "m" değiştiricisi ayarlanmışsa true değerini, aksi takdirde false değerini döndürür.
Tarayıcı Desteği
multiline
bir ECMAScript1 (ES1) özelliğidir.
ES1 (JavaScript 1997) tüm tarayıcılarda tam olarak desteklenir:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
Sözdizimi
RegExpObject.multiline
Geri dönüş değeri
Type | Description |
---|---|
Boolean | Returns true if the "m" modifier is set, false otherwise |