Question: For example I have a string with html code.

```
const string = `
  <div>
    <h1>Title</h1>
    <h2>Subtitle</h2>
    <div class="find-me">text</div>
  </div>
`;

```

Expected result with JS script:

```
<div class="find-me">text</div>

```

How it's possible to do it without jquery and other libraries/frameworks ?

Answer: 
Try this

```
const string = `
  <div>
    <h1>Title</h1>
    <h2>Subtitle</h2>
    <div class="find-me">text</div>
  </div>
`;
let arr  = string.split('\n');
for(let i=0; i<arr.length; i++){ 
    if(arr[i].search("find-me") != -1){ 
        console.log(arr[i]);
     }
}

```
you can create a temporary element and attach the string using innerHTML:

```js
let tempElement = document.createElement("div");
tempElement.innerHTML = string;
const myElement = tempElement.querySelector(".find-me");
```