regex - JavaScript Split without losing character -


I want to split some text using javascript. The text looks like this:

  9:30 am The user welcomed the action A 10:30, user John Doe. 11:30 am Message User John Do  

Now, I want to split the string into events. I.e. ::

  9:30 pm User Actions A  

There will be an incident. I am using RegEx for this:

  var split = journals.split (/ \ d * \ d: /);  

The thing is, the first two letters are lost. The split looks like this:

  30 AM the user took action A.  

How do I divide so that the split holds the first two / three characters

-text "itemprop =" Text ">

Use a letterhead:

  var split = journals.split (/ (? = \ B \ d +) /);  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -