Q:

Search for a word using jquery

There are lot of features for a product x, i want to make a search field so that users can easily find a particular feature of x easily.
so here's what i have come up with (i stumbled upon this code from a bootstrap webpage).
<div class="container">
    <div class="row">
        <h2 class="text-primary title"><span class="glyphicon glyphicon-align-justify"></span>User list</h2>
        <div class="col-lg-12">
            <input type="search" class="form-control" id="input-search" placeholder="Search..." >
        </div>
        <div class="searchable-container">
            <div class="items col-xs-12 col-sm-6 col-md-6 col-lg-6 clearfix">
               <div class="info-block block-info clearfix">
                    <div class="square-box pull-left">
                        <span class="fa fa-user"></span>
                    </div>
                    <h5 class="text-success">Company Name</h5>
                    <h4>sms</h4>
                    <p>Title: Manager</p>
                    <span>Email: sample@company.com</span>
                </div>
            </div> 

        </div>
    </div>
</div>

script code
<script>

jQuery(document).ready(function($){   
        $('#input-search').on('keyup', function() {
          var rex = new RegExp($(this).val(), 'i');
            $('.searchable-container .items').hide();
            $('.searchable-container .items').filter(function() {
                return rex.test($(this).text());
            }).show();
        });
    });
</script>

the problem is that this script searches for a particular word inside whole paragraph. i want only the heading to be searched. ie,<h5 class="text-success">Company Name</h5> not the whole thing. how can i do that? i tried something like this but with no success
 jQuery(document).ready(function($){   
            $('#input-search').on('keyup', function() {
              var rex = new RegExp($(this).val(), 'i');
                $('.searchable-container .text').hide();
                $('.searchable-container .text').filter(function() {
                    return rex.test($(this).text());
                }).show();
            });
        });

A:

Code Edited : 
return rex.test($(this).find(".text-success").text());

Demo : 

jQuery(document).ready(function($){   
        $('#input-search').on('keyup', function() {
          var rex = new RegExp($(this).val(), 'i');
            $('.searchable-container .items').hide();
            $('.searchable-container .items').filter(function() {
                return rex.test($(this).find(".text-success").text());
            }).show();
        });
    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="container">
    <div class="row">
        <h2 class="text-primary title"><span class="glyphicon glyphicon-align-justify"></span>User list</h2>
        <div class="col-lg-12">
            <input type="search" class="form-control" id="input-search" placeholder="Search..." >
        </div>
        <div class="searchable-container">
            <div class="items col-xs-12 col-sm-6 col-md-6 col-lg-6 clearfix">
               <div class="info-block block-info clearfix">
                    <div class="square-box pull-left">
                        <span class="fa fa-user"></span>
                    </div>
                    <h5 class="text-success">Company Name</h5>
                    <h4>sms</h4>
                    <p>Title: Manager</p>
                    <span>Email: sample@company.com</span>
                </div>
            </div> 
            
<div class="items col-xs-12 col-sm-6 col-md-6 col-lg-6 clearfix">
               <div class="info-block block-info clearfix">
                    <div class="square-box pull-left">
                        <span class="fa fa-user"></span>
                    </div>
                    <h5 class="text-success">Company Name 1</h5>
                    <h4>sms </h4>
                    <p>Title: Manager1</p>
                    <span>Email: sample1@company.com</span>
                </div>
            </div> 
        </div>
    </div>
</div>

