tailieunhanh - Web Server Programming phần 4

Đọc và xử lý dòng đầu vào của đường dây. Thay đổi mỗi dòng bằng cách loại bỏ tất cả Chuỗi bằng cách sử dụng một mô hình phù hợp thay thế (lưu ý rằng một đầu vào như ' Tiếp theo ' nên để lại các văn bản 'Next'). Sản lượng các văn bản cập nhật để các tập tin đầu ra, bỏ qua dòng nào đang trống. | Exercises 175 Read and process the input line by line. Change each line by removing all . sequences using a substitution pattern match note that an input like a href link Next a should leave the text Next . Output the updated text to the output file omitting any lines that are now blank. This program will not correctly process HTML tags that are opened on one line and closed on a subsequent line. 4 Revise the program from Exercise 3 so that it reads the entire input file into memory and processes its contents as a single long string. HTML tags that span multiple lines should now be handled correctly. 5 Write a program that will use regular expression pattern matching to find all HTML a href . link tags in an input HTML file and will use these data to construct a collection of the names of the different files referenced in links. These filenames are to be printed when the input data have all been processed. 6 This example is for implementation on a Unix system where the finger command can be used to lookup the name of a user whose login id is known. Write a program that is to help administrative staff who have to transcribe students assignment marks into a University database system. Marks are returned by tutors in files that list student user-ids and marks for example aa63 7 am83 bjr02 8 cjw11 The database system does not display user-ids instead it lists students by name ordered by family name. The finger command can be used to find the name of the person with a given user-id. The following are typical outputs from finger finger bm07 Login name bm07 Directory home ug c bm07 Never logged in. finger rgc01 Login name rgc01 Directory home ug u rgc01 Never logged in. In real life Bradley Milner Shell share bin uow_sh In real life Robert George Composti Shell share bin uow_sh The program is to read marks files supplied by tutors convert user identifiers to names and list names and marks in the correct order for transcription to the

crossorigin="anonymous">
Đã 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.