I have a text in the following format:
Concept number 1: my content here1<br>
Concept number 2: my content here2<br>
Concept number 3: my content here3<br>
I want a regext to get the text after Concept number 1:
. So I want to get the following: my content here1
.
I was using Concept number 1(.*?)<br>
, but I'm getting the whole string as a result instead of the text after the colon.
var text = $('.text').html();
var regex = new RegExp('Concept number 1:(.*?)<br>', "g");
var matches = text.match(regex);
//matches contains `Concept number 1: my content here1<br>`
` – Alvaro Nov 01 '17 at 15:57