File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
9-regular-expressions/14-regexp-lookahead-lookbehind/2-insert-after-head Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- # Insert After Head
1+ # Додайте після тегу Head
22
3- We have a string with an HTML Document .
3+ У нас є рядок з HTML-документом .
44
5- Write a regular expression that inserts ` <h1>Hello </h1> ` immediately after ` <body> ` tag. The tag may have attributes .
5+ Напишіть регулярний вираз який вставляє ` <h1>Привіт </h1> ` одразу після тегу ` <body> ` . Тег може мати атрибути .
66
7- For instance :
7+ Приклад :
88
99``` js
10- let regexp = / your regular expression / ;
10+ let regexp = / ваш регулярний вираз / ;
1111
1212let str = `
1313<html>
@@ -17,13 +17,13 @@ let str = `
1717</html>
1818` ;
1919
20- str = str .replace (regexp, ` <h1>Hello </h1>` );
20+ str = str .replace (regexp, ` <h1>Привіт </h1>` );
2121```
2222
23- After that the value of ` str ` should be :
23+ Після цього значення ` str ` має бути :
2424``` html
2525<html >
26- <body style =" height : 200px " ><h1 >Hello </h1 >
26+ <body style =" height : 200px " ><h1 >Привіт </h1 >
2727 ...
2828 </body >
2929</html >
You can’t perform that action at this time.
0 commit comments