Javascript bible_ Chapter 30

Tham khảo sách 'javascript bible_ chapter 30', 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ả | Regular Expression and RegExp Objects Web programmers who have worked in Perl and other Web application programming languages know the power of regular expressions for processing incoming data and formatting data for readability in an HTML page or for accurate storage in a server database. Any task that requires extensive search and replacement of text can greatly benefit from the flexibility and conciseness of regular expressions. Navigator 4 and Internet Explorer 4 bring that power to JavaScript. Most of the benefit of JavaScript regular expressions accrues to those who script their CGI programs with LiveWire on Enterprise Server 3 or later. The JavaScript version in the LiveWire implementation includes the complete set of regular expression facilities described in this chapter. But that s not to exclude the client-side from application of this language within a language. If your scripts perform client-side data validations or any other extensive text entry parsing then consider using regular expressions rather than cobbling together comparatively complex JavaScript functions to perform the same tasks. Regular Expressions and Patterns In several chapters earlier in this book I describe expressions as any sequence of identifiers keywords and or operators that evaluate to some value. A regular expression follows that description but has much more power behind it. In essence a regular expression uses a sequence of characters and symbols to define a pattern of text. Such a pattern is used to locate a chunk of text in a string by matching up the pattern against the characters in the string. An experienced JavaScript writer might point out the availability of the and string. lastIndexOf methods that can instantly reveal whether a string contains a substring and even where in the string that In This Chapter What regular expressions are How to use regular expressions for text search and replace How to apply regular expressions to string object methods 620

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.