N
N
novnovember242017-10-13 12:06:41
HTML
novnovember24, 2017-10-13 12:06:41

How to find and replace some combinations of letters and numbers in an html document with others?

There is a large, just huge, html document. The document contains combinations of letters and numbers of the form:
code_X, where code is a certain constant, the same text, and X is a combination of letters and numbers, each time different. Well, for example:
code_123or code_АБВor code_34ВА3ВАВА834
All phrases of the form code_XI need to replace with others, conditionally new_code. That is, so that and code_123and code_АБВand code_34ВА3ВАВА834turns into new_code.
How can this be done in the best possible way? In addition to HTML and CSS, I only know the basics of js. :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew, 2017-10-13
@novnovember24

code_\w*
You can practice here

X
xmoonlight, 2017-10-13
@xmoonlight

Regular expressions and text editor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question