forum

Home / DeveloperSection / Forums / How to Extract Sub string between two string pattern using Javascript/JQuery

How to Extract Sub string between two string pattern using Javascript/JQuery

Anonymous User 2249 20-Jan-2015

I am new to regular expression. I need to extract between two string pattern ([[tag:: & ]]) and for each occurrence.

For Example:

If the text is :

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus [[tag::4797897]] mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.

[[tag::4797800]] [[tag::4797769]]

As I want the extract text between [[tag:: and ]] , the expected output should be 4797897 , 4797800 and 4797769

I am using Javascript and JQuery

Can some please help me . Thanks in advance


Updated on 20-Jan-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By