for example:
var str="1234HAGSFC"
:334
123 4HA GSFC
:4321
1234 HAG SF C
...
for example:
var str="1234HAGSFC"
:334
123 4HA GSFC
:4321
1234 HAG SF C
...
take 334 as an example:
334
var str="1234HAGSFC";
var regex = /(.{3})(.{3})(.{4})/
str.match(regex); //["1234HAGSFC", "123", "4HA", "GSFC", index: 0, input: "1234HAGSFC", groups: undefined]
returns an array, and the middle part is the
you need.Previous: Problems with C language files
Next: Matplot dynamic drawing, how to clear only the redrawn legend?
^ ([a-zA-Z] + [A-Za-z0-9 -] * [a-zA-Z0-9]) | ([a-zA-Z]) $ .test ( 11a ) true and ^ (([a-zA-Z] + [A-Za-z0-9 -] * [a-zA-Z0-9]) | ([a-zA-Z])) $ .test ( 11a ) false Why are the results different The difference between the two regula...