In diesem Artikel wird beschrieben, wie JS regelmäßige Ausdrücke verwendet, um die kühne Funktion von Keyword -Ersatz zu implementieren. Teilen Sie es für Ihre Referenz wie folgt weiter:
<! DocType html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transsitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html; charset = gb2312"/> <title> regulärer Ersatz </title> </head> </head> <body> <body> <body> <body> <body> <body> <Body> <body> <Body> <Body> <Body> <Bods> <Body> <body> <Bods> <body> <Body> <Body> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> <Bods> </". Schlüsselwörter mit BOLD, Text BOLD.
Der Screenshot des Laufeffekts lautet wie folgt:
PS: Hier sind zwei sehr bequeme reguläre Ausdruckswerkzeuge für Ihre Referenz:
JavaScript regulärer Ausdruck Online -Test -Tool:
http://tools.vevb.com/regex/javaScript
Regelmäßiger Ausdruck Online -Generierungstool:
http://tools.vevb.com/regex/create_reg
For more information about JavaScript related content, please check out the topics of this site: "JavaScript Regular Expression Skills", "Summary of JavaScript Replacement Operation Skills", "Summary of JavaScript Search Algorithm Skills", "Summary of JavaScript Data Structure and Algorithm Skills", "Summary of JavaScript traversal algorithms and techniques", "Summary of json operation techniques in JavaScript "," Zusammenfassung von JavaScript -Fehlern und Debugging -Fähigkeiten "und" Zusammenfassung der Nutzung von JavaScript Mathematical Operation ""
Ich hoffe, dieser Artikel wird für JavaScript -Programme aller hilfreich sein.