javascript-tutorial / javascript-tutorial/en.javascript.info
Lack of essential detail about regexp lookbehind syntax in "Lookahead and lookbehind" article
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- HTML
- Star
- 25.5k
- Fork
- 4k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
[Part 3 (Additional articles)](https://javascript.info/#tab-3)
[Chapter 7 (Regular expressions)](https://javascript.info/regular-expressions)
[Article 14 (Lookahead and lookbehind)](https://javascript.info/regexp-lookahead-lookbehind)
Why you don't mention that in JS non fixed length regexps (including quantifiers, backreferences etc.) are not allowed inside lookbehind expression ?
First you talk about [lookahead](https://javascript.info/regexp-lookahead-lookbehind#lookahead), and using regexp with quantifier as lookahead condition in your example.
_Copied from [www.javascript.info](https://javascript.info)_
For example, `\d+(?=\s)`**`(?=.*30)`** looks for `\d+` that is followed by a space `(?=\s)`, and there’s `30` somewhere after it **`(?=.\*30)`**
Right after this you briefly talk about [lookbehind](https://javascript.info/regexp-lookahead-lookbehind#lookbehind) and say it is the same thing but looks behind, without mentioning that it actually cannot do the same thing with non fixed lenght regular expressions (including quantifiers like **\***).
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với bài viết “Lookahead and lookbehind” được liên kết trong issue, đặc biệt là các phần về lookahead và lookbehind. So sánh các ví dụ được ghi lại với các hạn chế của JavaScript đối với các mẫu có độ dài không cố định trong các biểu thức lookbehind. Được xem là hoàn thành khi bài viết giải thích rõ hạn chế này và phân biệt hành vi của lookahead với hành vi của lookbehind.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 38/100