How to regularly match paragraph data at the beginning of a number?

data like getting to the background

  1. every tablet is the hard work of the farmers, and it is distributed to Party An in the room. two Every grain is the hard work of the farmers, and it is distributed to Party An in the room. 3. Every grain is the hard work of the farmers, and it is distributed to Party An in the room. 4. Every grain is the hard work of the farmers, and it is distributed to Party An in the room.

to show:

at the front end
  1. every grain is the hard work of the farmers, and it is distributed to Party An in the room.
  2. every grain is the hard work of the farmers, and Party A"s
  3. is distributed in the room.
  4. every grain is the hard work of the farmers, and Party A"s
  5. is distributed in the room.
  6. every grain is the hard work of the farmers, and Party A"s
  7. is distributed in the room.

I would like to ask you how to use regular matching for this kind of paragraph style? (the rules used are unfamiliar and unsuccessful.)

Apr.01,2021

var str = '1.2. 3. 4. ';
var reg = /\d[^\d]*/g
while(result = reg.exec(str)) {
    console.log(result[0])
}

just match a result array directly with match:

var str = '1.2. 3. 4. ';

const result = str.match(/(\d[^\d]*)/g)

clipboard.png

 "1.2. 
3. 4. "
.split(/\d+\./).map(function(str){ return str.replace(/(^\s*)|(\s*$)/g, ""); })

.

Just one sentence will be fine.

str.replace(/[^^](\d+\.)/g, '\n$1');

text.replace(/(?!^)(?=(\d\.))/g, '\n')
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa2ce-47d7c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa2ce-47d7c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?