on-internet
← Community

How can I make a regular expression to be non-greedy?

Stack Overflow ·

I'm using jQuery. I have a string with a block of special characters (begin and end). I want get the text from that special characters block. I used a regular expression object for in-string finding. But how can I tell jQuery to find multiple results when have two special character or more? My HTML content: <div id="container"> <div id="textcontainer"> Cuộc chiến pháp lý giữa [|cơ thử|nghiệm|] thị trường [|test2|đây là test lần 2|] chứng khoán [|Mỹ|day la nuoc my|] và ngân hàng đầu tư quyền lực nhất Phố Wall mới chỉ bắt đầu. </div> </div> And my JavaScript code: $(document).ready(function() {

Comments

Sign in or sign up to comment and upvote.

No comments yet.