Using WPS to quickly organize Chinese-English mixed rows of Web page text

Source: Internet
Author: User
Tags character set mixed return tag

A friend downloads a technical document from the Web, finds that there is a paragraph symbol at the end of each line in the document, and the first paragraph that really wants to be segmented has 4 half-width spaces and many empty segments. Want to rearrange, because the document is relatively long, manual operation certainly not, I recommend to him with WPS text "intelligent format collation" function. When the document is open, with the mouse click on the "Tools" menu under the "text tools → intelligent formatting", after a few seconds, all the first blank space disappeared, paragraph and paragraph between the empty paragraph is eliminated, but each line of the end of the paragraph mark is still there.

Automatic processing is not possible, can only be done by hand. Because of "intelligent format processing", the original paragraph of the first space is not, there is no way to determine which line is the real paragraph, but more difficult to operate, and then restore the document to the original state, all from the beginning.

First, the row with 4 half-width spaces at the beginning of the line is the "start" of the true paragraph, and the line with no spaces at the beginning is the row in the paragraph, and the preceding paragraph mark is removed. Press "Shift+h", bring up the Find and Replace tool, enter "^p" in "find" (that is, ^p followed by 4 half-width spaces), and in replace with, enter a special character (such as "¥¥¥¥") that will not appear in the text, and point "Replace all". In this way, the real need to segment the place with special characters "¥¥¥¥" replaced, next, remove the unnecessary paragraph marks, click "Shift+h", enter "^p" in "Find", "Replace with" leave blank, point "Replace all", delete all paragraph marks, and then press once more "shift+ H ", enter the previously set special character" ¥¥¥¥ "in" Find ", enter the paragraph mark (^p) in" Replace with ", and press" replace all "to finish the formatting.

Originally thought this kind of operation after the friend will be more satisfied, but unceasingly again appeared the new question. Originally, this technical document has a lot of English information, and English is not a paragraph of the habit of the first space. The above processing, although the Chinese part does not have any problem, but causes the English part to squeeze into a "paragraph", the place which originally wants to divide is not separate.

Helpless, had to restore the document to the original state again. Deal with the English part first. By observing the English part, we find that there is usually a punctuation mark in the end of the line, and there is a half-width space between the words before the extra paragraph mark and the paragraph mark. Instead, use the Find and Replace feature to remove all the paragraph marks that have half of the space in front of them, that is, enter "^p" in "Find" (half a space before ^p), and enter only one half-width space in "Replace with" and replace all.

Then use the previous method to convert the real paragraph marks in English into special characters, that is, enter "^p^$" in "find" to indicate the return tag followed by an English letter, enter "####^&" in "Replace with", where "#" is the special character set, used to represent the first paragraph in English, and "^&" means "What to look for", in other words, the search to the beginning of all of the "#" marked out, all replaced, with the previous approach to deal with Chinese after the completion of the process, the English paragraph mark was also removed, leaving only our set "" ", and then all" ### # "Replace with a paragraph mark.

This completes the rearrangement of all the Chinese and English in the document, and the whole document is neatly arranged and new.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.