File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
9-regular-expressions/10-regexp-greedy-and-lazy/4-find-html-tags-greedy-lazy Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11
2- The solution is ` pattern:<[^<>]+> ` .
2+ La soluzione è ` pattern:<[^<>]+> ` .
33
44``` js run
55let regexp = / <[^ <>] + >/ g ;
Original file line number Diff line number Diff line change 1- # Find HTML tags
1+ # Trovate i tag HTML
22
3- Create a regular expression to find all (opening and closing) HTML tags with their attributes .
3+ Create un'espressione regolare per trovare tutti i tag HTML (di apertura e di chiusura) con i loro attributi .
44
5- An example of use :
5+ Ecco un esempio d'uso :
66
77``` js run
88let regexp = / your regexp/ g ;
@@ -12,4 +12,4 @@ let str = '<> <a href="/"> <input type="radio" checked> <b>';
1212alert ( str .match (regexp) ); // '<a href="/">', '<input type="radio" checked>', '<b>'
1313```
1414
15- Here we assume that tag attributes may not contain ` < ` and ` > ` (inside quotes too), that simplifies things a bit .
15+ In questo caso presumiamo che gli attributi dei tag non contengano ` < ` e ` > ` dentro i doppi apici per semplificare le cose .
You can’t perform that action at this time.
0 commit comments