I want to split following string into two parts using split function of javascript
original string is ‘Average Sized’ – ‘Mega Church!’ (with single quotes)
please mark that there is a single quote inside the string
and i want to split it by hyphen symbol so the result would be
[0] Average Sized
[1] Mega Church!
try this:
edit:
if you mean the original string INCLUDES the single quotes, this should work:
if you just meant that the string is defined with single quotes, the original will work.