In class="listing" all li a with string "-p." should be replaced to " / p. " eg. "1r-p.1_1" should be converted to "1r / p. 1_1".
current situation:
<ul class="listing">
<li><a href="#">1r-p.1_1</a></li>
<li><a href="#">1v-p.1_2</a></li>
<li><a href="#">2r-p.1_3</a></li>
</ul>
the goal:
<ul class="listing">
<li><a href="#">1r / p. 1_1</a></li>
<li><a href="#">1v / p. 1_2</a></li>
<li><a href="#">2r / p. 1_3</a></li>
</ul>
I tried with the following snippet but it doesn't affect anything.
$(document).ready(function() {
$("ul.listing a").text().replace(/-p\./, ' / p. ');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="listing">
<li><a href="#">1r-p.1_1</a></li>
<li><a href="#">1v-p.1_2</a></li>
<li><a href="#">2r-p.1_3</a></li>
</ul>