Chetan Kumar
Chetan Kumar

Reputation: 300

REGULAR EXPRESSION Required to unmatch

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 "##&#xa"

Please help

Upvotes: 0

Views: 118

Answers (1)

nu11p01n73R
nu11p01n73R

Reputation: 26667

You can use a negative look ahead as

/##(?!&#xa)/
  • (?!&#xa) Negative look ahead. Asserts that the ## is not followed by &#xa

Regex Demo

Upvotes: 1

Related Questions