regex split problem
Posted
by sunil-mand99
on Stack Overflow
See other posts from Stack Overflow
or by sunil-mand99
Published on 2010-04-16T04:00:37Z
Indexed on
2010/04/16
4:03 UTC
Read the original article
Hit count: 394
regex
|JavaScript
I have javascript string variable with
var sttr="We prefer questions that can be answered --------------------- not just discussed ---------------------
Provide details ---------------------------- Write clearly and simply --------------------------answer all the question"
please suggest how to split the string into array of sentences on the basis of dashes(-----) using regex
result should be
array[0]=We prefer questions that can be answered
array[1]=not just discussed
array[2]=Provide details
array[3]=rite clearly and simply
array[4]=answer all the question
Note: dash(-----) range after each sentence is between 10 to 50
© Stack Overflow or respective owner