.
E2AB7DAF-D668-44F8-B38D-252FE2D025E9.5304
E2AB7DAF-D668-44F8-B38D-252FE2D025E9.1000
E2AB7DAF-D668-44F8-B38D-252FE2D025E9.66666
.
E2AB7DAF-D668-44F8-B38D-252FE2D025E9.5304
E2AB7DAF-D668-44F8-B38D-252FE2D025E9.1000
E2AB7DAF-D668-44F8-B38D-252FE2D025E9.66666
use regular packet matching:
var str='E2AB7DAF-D668-44F8-B38D-252FE2D025E9.5304'
console.log(str.match(/(\w+)\.(\d+)/)[2])
so you can get the number you want.
using regular reverse positive pre-check, matching "before is." And ends with an indefinite number "
"var str='E2AB7DAF-D668-44F8-B38D-252FE2D025E9.5304'
str.match(/(?<=\.)\d+$/)[0] // "5304"
function getNum() {
var str =
"E2AB7DAF-D668-44F8-B38D-252FE2D025E9.5304 E2AB7DAF-D668-44F8-B38D-252FE2D025E9.1000 E2AB7DAF-D668-44F8-B38D-252FE2D025E9.66666"
var reg = /\.\d+/g //"\.""." "d+"g
var result = str.match(reg) //
console.log(result) //[".5304", ".1000", ".66666"]
for (var i = 0; i < result.length; iPP) { //
var s = result[i].substring(1) //
console.log(s) //5304 1000 66666
}
}
getNum()
Previous: What happened when react reported Cannot call a class as a function, in ie9?
Next: Part of the es6 syntax is not compiled when the vue official template is packaged
Please recommend the library reported by error monitoring at the front end, or post relevant codes the discovery written by myself is not comprehensive, unable to listen for resource errors, but can only listen for run-time errors. I don t know if th...
What is the principle of cross-domain proxy proxyTable in 1.node? 2. When I do not set CORS on both the browser and the server, I can cross-domain by setting proxytable. Does this go against the original intention of the same origin policy? ps: woul...
the specific error message is shown in the following figure. What is wrong with this? How to solve it? ...
< form action= " addPackageType " method= "post " enctype= "multipart form-data " > <label for="packageName">< label> <input type="text" name="packageName" id="pa...
Xiaobai asks for advice ~ app.post( get-name ,function(req, res) { sql.query( select stuName from student ,function(err, row){ if(err || row.length == 0) { console.log(err); } else { var stuname = {} ...
A rookie at the front end is now developing a company project, using the development mode of the vue build tool, and then there are some problems when debugging the interface with the back end. The server software used by the company is apache,. Once a c...
after the tree component in iview uses render custom content, clicking on the tree node no longer displays the background. How to add background color to the currently selected node in render rendering? 1, the default tree component, click 2render w...
A recent VUE project has reported errors at intervals in the development phase in the same project, many people collaborate, and others do not report errors. my computer i8 8g memory WIN10 NODE version has tried 6.x 8.11.1 (latest) 8.0.0 (colleague ...
such as the question, and the increase of pixels popped up after each minimization is not the same, and there is no rule to follow. Waiting for the boss to answer ...
in the past, when using node+ejs, the image path was returned directly, but after the front and rear ends were separated, the front end could not access the back end image path, so I would like to ask whether the picture is displayed through the get inte...
is like this, every page needs to call some api,. If you write request, on each page, it will feel cumbersome. Is there a good way to write it as a common module, and then introduce a module? ...
question: vue-cli modifies the file under MAC. It doesn t compile automatically, and it doesn t report an error. What s going on here? Action: the webstorm I used turned off the safewrite and it didn t work. Changing the editor won t work. I can t...
I am now writing an operating system that is written to hbase. The front end is vue.js, and the back end is node.js, database RT, is hbase. At present, my front-end can send data to the back-end to receive, but when writing, I always report an error. U...
does anyone use Huanxin for webim development? an error is reported at the file introduction stage. I hope there can be an open source example to refer to . It is best to use vue to develop ....
var data = [{ id:1 } ,{ id:2 } ,{ id:3 }] is similar to this structure. An element object in data corresponds to a record in a database table. then Sequelize how to do it all at once? ...
as shown in the figure, Table 1 is associated with Table 2. How to click submit and save the two tables together ...
how does the background management system display in the background to set the time and place of the last login ...
for example, I used npm install amazeui to download a dependent amazeui . there are js and css, in this amazeui. At this time, I want to reference these js in vue to get css,. What should I do? Do not use the reference method of the folder path, plea...
for example: obj = {name: wh }, add obj to arr = [1,2,3], and the implementation result is arr = [{name: wh }, 1,2,3] ...
build the https service with koa.js in the nuxt.js project, and the project starts unsuccessfully js in server Boot log seen with pm2 logs ...