JSFiddle - React, Tailwind, and code Playground

HTML

<div class="forall">
    
    <div class="inText">Hello g World /With 20px
    
    </div>
    <div class="forall">abc
        <div>Hello g World / Without font
           
        </div>
        <div class="forall">
            <div class="intext2">Hello g World 
abc               
            </div>

JavaScript

var temp = $('body').text();
var count = temp.match(/abc/);
alert(count);
alert(count.length);