Hello!
I’m trying to do a javascript match for links that start with any number and end with the word Contents. Currently, I’m using:
/>\\d.*Contents/
which would then pull off “>0. Table of Contents” from:
<a class="sf-with-ul" href="/books/Partsch_1/Table_of_Contents/table_of_contents.php">0. Table of Contents
Truth be told, I just want “0. Table of Contents” as opposed to the opening “>”. While I know that I can just use the substr() method, I’d much rather improve my somewhat non-existent regex skills. My attempt was to use
/\\d.*Contents/
which unfortunately pulled off
1/Table_of_Contents/table_of_contents.php">0. Table of Contents
Is there a cleaner regex solution?
Thank you,
Eric