I'm new to regex, so I hope this isn't too obvious a question
I'm looking for the neighborhood in craigslist apartment listing's html. The neighborhood is listed like this
(castro / upper market)
</h2>
And here is an example of the html...
<a class="backup" disabled="disabled">▲</a>
<a class="next" disabled="disabled"> next ▶</a>
</span>
</section>
<h2 class="postingtitle">
<span class="star"></span>
$5224 / 2br - Stunning Furnished 2BR with Hardwwod Floors & Newly renovated Kitchen (pacific heights)
</h2>
<section class="userbody">
<figure class="iw">
<div class="slidernav">
<button class="sliderback"><</button>
<span class="sliderinfo"></span>
<button class="sliderforward">></button>
This should find all the different neighborhoods
But it takes way too long on a full page of html
\w+\s?(\/)?\s?\w+\s?(\/)?\s?\w+\s?(\/)?\s?\w+\)\n<\/h2>
# \w+ to find the word
# \s?(\/)?\s? for a space or space, forward slash, space
# \n<\/h2> because </h2> is uniquely next to the neighborhood in the html
Is there a way to find
</h2>
Then look behind for the neighborhood string of text?
Thanks so much for any help or steering me in the right direction