How can i add css class to a specific li with a regex. which matches the text and assign only to the parent li which holds the matched set
<p><strong>i have two css classes</strong></p>

<pre>
file
folder
</pre> 

<p>Here what i want is to<br>
<strong>add a file class to the li which holds the link to the text file</strong><br>
and folder class to other all li.</p>

<pre>
demo1
**final-project.txt**
demo2
**semi-final-project.txt**
</pre>   

<p>Thanks for all help in advance.</p>
