Trang chủ
Bài viết mới
Diễn đàn
Bài mới trên hồ sơ
Hoạt động mới nhất
VIDEO
Mùa Tết
Văn Học Trẻ
Văn Học News
Media
New media
New comments
Search media
Đại Học
Đại cương
Chuyên ngành
Triết học
Kinh tế
KHXH & NV
Công nghệ thông tin
Khoa học kĩ thuật
Luận văn, tiểu luận
Phổ Thông
Lớp 12
Ngữ văn 12
Lớp 11
Ngữ văn 11
Lớp 10
Ngữ văn 10
LỚP 9
Ngữ văn 9
Lớp 8
Ngữ văn 8
Lớp 7
Ngữ văn 7
Lớp 6
Ngữ văn 6
Tiểu học
Thành viên
Thành viên trực tuyến
Bài mới trên hồ sơ
Tìm trong hồ sơ cá nhân
Credits
Transactions
Xu: 0
Đăng nhập
Đăng ký
Có gì mới?
Tìm kiếm
Tìm kiếm
Chỉ tìm trong tiêu đề
Bởi:
Hoạt động mới nhất
Đăng ký
Menu
Đăng nhập
Đăng ký
Install the app
Cài đặt
Chào mừng Bạn tham gia Diễn Đàn VNKienThuc.com -
Định hướng Forum
Kiến Thức
- HÃY TẠO CHỦ ĐỀ KIẾN THỨC HỮU ÍCH VÀ CÙNG NHAU THẢO LUẬN Kết nối:
VNK X
-
VNK groups
| Nhà Tài Trợ:
BhnongFood X
-
Bhnong groups
-
Đặt mua Bánh Bhnong
CÔNG NGHỆ
Công Nghệ Thông Tin
Code
Alternation construct trong C# là gì?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Trả lời chủ đề
Nội dung
<blockquote data-quote="uocmo_kchodoi" data-source="post: 177566" data-attributes="member: 165510"><p><a href="https://vnkienthuc.com/forums/code.377/" target="_blank"><span style="font-size: 18px">Alternation construct</span></a><span style="font-size: 18px"> trong C# sửa đổi một Regular Expression để kích hoạt có/không tác vụ so khớp.</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px">Danh sách các Alternation construct trong C#:</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"><span style="color: #0000ff"><strong>1. | </strong></span></span></p><p><span style="font-size: 18px"><strong><em>Miêu tả</em>: </strong>So khớp với bất kỳ một phần tử được<a href="https://vnkienthuc.com/threads/tim-hieu-ve-attribute-trong-c.77351/" target="_blank"> phân biệt riêng rẽ </a>bởi ký tự (|)</span></p><p><span style="font-size: 18px"><em><strong>Pattern:</strong></em> th(e|is|at)</span></p><p><span style="font-size: 18px"><em><strong>So khớp</strong>:</em> "the", "this" trong "this is the day. "</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"><strong><span style="color: #0000ff">2. (?( expression )yes | no )</span></strong></span></p><p><span style="font-size: 18px"><strong><em>Miêu tả</em>:</strong> So khớp với <em>yes</em> nếu <a href="https://vnkienthuc.com/threads/tim-hieu-ve-su-kien-trong-c.77357/" target="_blank">expression</a> là khớp; nếu không thì, so khớp phần<em>no</em> tùy ý. Expression được thông dịch như là một zero-width assertion</span></p><p><span style="font-size: 18px"><em><strong>Pattern:</strong></em> (?(A)A\d{2}\b|\b\d{3}\b)</span></p><p><span style="font-size: 18px"><em><strong>So khớp:</strong></em> "A10", "910" trong "A10 C103 910"</span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 18px"><strong><span style="color: #0000ff">3. (?( name )yes | no )</span></strong></span></p><p><span style="font-size: 18px"><strong><em>Miêu tả:</em></strong> So khớp với <em>yes</em> nếu name được bắt có một match; nếu không thì, so khớp với<em>no</em> tùy ý</span></p><p><span style="font-size: 18px"><em><strong>Pattern</strong></em>: (?< quoted>")?(?(quoted).+?"|\S+\s)</span></p><p><span style="font-size: 18px"><em><strong>So khớp</strong></em>: Dogs.jpg, "Yiska playing.jpg" trong "Dogs.jpg "Yiska playing.jpg""</span></p></blockquote><p></p>
[QUOTE="uocmo_kchodoi, post: 177566, member: 165510"] [URL='https://vnkienthuc.com/forums/code.377/'][SIZE=5]Alternation construct[/SIZE][/URL][SIZE=5] trong C# sửa đổi một Regular Expression để kích hoạt có/không tác vụ so khớp. Danh sách các Alternation construct trong C#: [COLOR=#0000ff][B]1. | [/B][/COLOR] [B][I]Miêu tả[/I]: [/B]So khớp với bất kỳ một phần tử được[URL='https://vnkienthuc.com/threads/tim-hieu-ve-attribute-trong-c.77351/'] phân biệt riêng rẽ [/URL]bởi ký tự (|) [I][B]Pattern:[/B][/I] th(e|is|at) [I][B]So khớp[/B]:[/I] "the", "this" trong "this is the day. " [B][COLOR=#0000ff]2. (?( expression )yes | no )[/COLOR][/B] [B][I]Miêu tả[/I]:[/B] So khớp với [I]yes[/I] nếu [URL='https://vnkienthuc.com/threads/tim-hieu-ve-su-kien-trong-c.77357/']expression[/URL] là khớp; nếu không thì, so khớp phần[I]no[/I] tùy ý. Expression được thông dịch như là một zero-width assertion [I][B]Pattern:[/B][/I] (?(A)A\d{2}\b|\b\d{3}\b) [I][B]So khớp:[/B][/I] "A10", "910" trong "A10 C103 910" [B][COLOR=#0000ff]3. (?( name )yes | no )[/COLOR][/B] [B][I]Miêu tả:[/I][/B] So khớp với [I]yes[/I] nếu name được bắt có một match; nếu không thì, so khớp với[I]no[/I] tùy ý [I][B]Pattern[/B][/I]: (?< quoted>")?(?(quoted).+?"|\S+\s) [I][B]So khớp[/B][/I]: Dogs.jpg, "Yiska playing.jpg" trong "Dogs.jpg "Yiska playing.jpg""[/SIZE] [/QUOTE]
Tên
Mã xác nhận
Gửi trả lời
CÔNG NGHỆ
Công Nghệ Thông Tin
Code
Alternation construct trong C# là gì?
Top