Intercept js strings and ask for advice

* * var str = "1048964" 1048965 "1048966" 1048967 "1048968"; beg on your knees!
how does jquery get the second and third value;
the expected result after intercepting the string is: 1048965 / 1048966 *

Mar.23,2021

var arr = str.split('_'),  //arr=[1048964,1048965,1048966,...]
arr
var newarr = arr.slice(1,2) //newarr

str.split ('_') [1] +'_'+ str.split ('_') [2]


length is fixed, direct calculation of position
length is not certain. Write regular expression


can first be divided into arrays with split, and then take the corresponding items for splicing.


str.match (/ ^ dongs _ (dcards /) /) [1]

clipboard.png

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-1b3b80d-2b600.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-1b3b80d-2b600.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?