I have a text in the following format:
Concept number 1: my content here1
Concept number 2: my content here2
Concept number 3: my content here3
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(.*?), 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:(.*?)
', "g");
var matches = text.match(regex);
//matches contains `Concept number 1: my content here1
`
No comments:
Post a Comment