TAILIEUCHUNG - Professional Information Technology-Programming Book part 108

Tham khảo tài liệu 'professional information technology-programming book part 108', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Information about Bluetooth and more. BODY hH 1 . hH 1 BODY H1 Welcome to my Homepage H1 Content is divided into two sections BR H2 ColdFusion H2 Information about Macromedia ColdFusion. H2 Wireless H2 Information about Bluetooth and more. BODY The pattern hH 1 . hH 1 matched the first header from H1 until H1 and would also match h1 as HTML is not case sensitive . But what pattern could be used to match any header which may be using any of the six valid header levels One option would be to use a simple range instead of 1 like this BODY H1 Welcome to my Homepage H1 Content is divided into two sections BR H2 ColdFusion H2 Information about Macromedia ColdFusion. H2 Wireless H2 Information about Bluetooth and more. BODY hH 1-6 . hH 1-6 BODY H1 Welcome to my Homepage H1 Content is divided into two sections BR H2 ColdFusion H2 Information about Macromedia ColdFusion. H2 Wireless H2 Information about Bluetooth and more. BODY That seemed to work hH 1-6 matches any header start tag H1 and H2 in this example and hH 1-6 matches any header end tag H1 and H2 . Note Notice that . lazy was used here and not . greedy . As explained in Lesson 5 Repeating Matches quantifiers such as are greedy and so pattern hH 1-6 . hH 1-6 could match all the way from the opening H1 on the second line until the closing H2 on the sixth line. Using the lazy quantifier . instead solves this problem. I said could and not would because this specific example would probably have worked even with the greedy quantifier. Metacharacter . usually does not match line breaks and in the example each header is on its own line. But there is no downside to using the lazy quantifier here so better safe than sorry. Success Not exactly. Look at the following example using the same pattern BODY H1 Welcome to my Homepage H1 Content is divided into two sections BR H2 ColdFusion H2 Information about Macromedia ColdFusion. H2 Wireless H2 Information about Bluetooth and more. H2 This is .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.