Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use regular batch to remove redundant codes for downloading files in Teleport Pro whole site

Shulou Source: shulou.com Published: 2022-06-01 06:50:55 10月01日 Update

This article mainly introduces how to use regular batch removal Teleport Pro whole station download file redundant code, has a certain reference value, interested friends can refer to, I hope you read this article after a lot of gains, the following let Xiaobian with everyone to understand.

tppabs

html The tppabs tag in the original file is a tag left behind by Teleport Pro software. The software is an offline browser, and after downloading the entire web page, it inserts tppabs tags within the image or hyperlink tags to record the original address of the image or hyperlink. Because this tag is not legal, normal browsers ignore it. But you can read this attribute in JS via element.getAttribute("tppabs").

If we clean it manually, it will be an incalculable amount of work and need to be cleaned in batches. Using DreamWeaver regular expressions to clear tppabs in batches is easier and faster.

The method is as follows:

Use DW replacement function:

Search scope: entire current local site

Search for: Source Code

Find: \btppabs="h[^"]*"

Replace: (blank)

Check: Use regular expressions

Click the Replace All button

Match javascript code:

The method is as follows:

Search scope: entire current local site

Search for: Source Code

Find: href="_javascript:if\(confirm\('htt[^"]*"

Replace: href= www.xxx.com

Check: Use regular expressions

Click the Replace All button

Note: If the expression contains a different URL, match the part without the URL with if\(confirm\('htt[^"]*\)(note whether other code uses this syntax) and replace it with null.

css file has some code like/*tpa=http://www.xxx.com/test.gif $>/

The method is as follows:

Search scope: entire current local site

Search for: Source Code

Find: \/\*tpa=http://[^\s]*\/

Replace: null

Check: Use regular expressions

Click the Replace All button

Character matching example ^Input or beginning of line.^ T matches "T" in "This good earth," but does not match "T" in "Uncle Tom's Cabin."$ Enter or end of line. h$matches "h" in "teach" but does not match "h"*0 or more leading characters in "teacher." um* matches "um" in "rum,""umm" in "yummy," and "u"+1 or more leading characters in "huge." um+ matches "um" in "rum" and "umm" in "yummy," but nothing in "huge"? The leading character appears at most once (i.e., indicates that the leading character is optional). st? on matches "son" in "Johnson" and "ston" in "Johnston," but there are no matches in "Appleton" and "tension." Any single character other than a newline character. an matches "ran" and "can"x in the phrase "bran muffins can be tasty"| yx or y. FF0000| 000FF matches exactly n leading characters of "FF0000" in bgcolor="#FF0000" and "0000FF"{n} in font color="#0000FF." o{2} matches "oo" in "loom" and the first two "o" in "mooooo," but there are no matches {n,m} in "money" for at least n and at most m leading characters. F{2,4} matches "FF" in "#FF0000" and any of the bracketed characters of the first four "F"[abc] in "#FFFFFF." Specify a range of characters with hyphens (for example,[a-f] is equivalent to [abcdef]). [e-g]Matches any character that is not enclosed in parentheses for "e" in "bed,""f" in "folly," and "g"[^abc] in "guard." Specify a range of characters with hyphens (for example,[^a-f] is equivalent to [^abcdef]). [^aeiou] initially matches "r" in "orange,""b" in "book," and "ek! word boundary (such as a space or carriage return) in.\b bb matches "b" in "book," but there are no matches in "goober" and "snob"\Banything outside the word boundary.\ Bb matches 'b' in 'goober' but there is no match\d in 'book'. Equivalent to [0-9].\ d Matches "3" in "C3PO" and "2"\D in "apartment 2G" Any non-numeric character. Equivalent to [^0-9].\ D matches the "S" in "900S" and the "Q"\f form change in "Q45."

\n Newline.

\r Enter character.

\s Any single white space character, including spaces, tabs, form breaks, or newlines.\ sbook matches 'book' in 'blue book' but does not have any matches\S in 'notebook'; any single non-white space character.\ Sbook matches "book" in "notebook," but there are no matches\ttabs in "blue book."

\w Any alphanumeric character, including underscore. Equivalent to [A-Za-z0 -9_]. b\w* matches "barking" in "the barking dog" and "big" and "black"\W in "the big black dog" any non-alphanumeric character. Equivalent to [^A-Za-z0 -9_].\ W match "Jake&Mattie" Thank you for reading this article carefully. I hope Xiaobian shares "How to use regular batch to remove redundant code of Teleport Pro whole station download file" This article is helpful to everyone. At the same time, I hope everyone will support you a lot. Pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Tags: Characters regularities codes labels ranges expressions files numbers articles buttons newline characters methods source code sites parts search redundancy tabs individual pictures Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Xiaomi vpn MariaDB Linux