Reputation: 300
var str = "##18-Dec-14 5:14 PM IST - admin ##
Adding Notes from REST :CHETAN##18-Dec-14 5:14 PM IST - admin ##
Adding Notes from REST :SHRUJAN";
Hi I need a regular expression to split the above string based on "##"
But i dont want to match "##
"
Please help
Upvotes: 0
Views: 118
Reputation: 26667
You can use a negative look ahead as
/##(?!
)/
(?!
)
Negative look ahead. Asserts that the ##
is not followed by 

Upvotes: 1