| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Guide/Regular_expressions/Assertions | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
(assertion) . , (look-ahead) (look-behind) .
:
? .
| x(?=y) | : x x y. , /Jack(?=Sprat)/ "Jack" "Sprat". /Jack(?=Sprat|Frost)/ "Jack" "Sprat" "Frost". , "Sprat" "Frost" . |
| x(?!y) | : x x y. , /\d+(?!\.)/ , . /\d+(?!\.)/.exec('3.141') "141", "3" . |
| (?<=y)x | : x x y. , /(?<=Jack)Sprat/ "Sprat" "Jack". /(?<=Jack|Tom)Sprat/ "Sprat" "Jack" "Tom". , "Jack" "Tom" . |
| (?<!y)x | : x x y. , /(?<!-)\d+/ , . /(?<!-)\d+/.exec('3') "3". /(?<!-)\d+/.exec('-3') , .. . |
This page was last modified on 11 . 2024 . by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |