Home > Net >  Jquery interception characters in a string
Jquery interception characters in a string

Time:11-10

Through regular expressions to intercept the characters of B073WKJ67W this character,

Husband - Pillow - Detachable - Removable Adjustable/ B073WKJ67W /ref=cm_cr_arp_d_rvw_fmt? Ie=UTF8 & amp; FormatType=current_format


Know this character length 10, capital to add digital mixing, each data character is different, but the length and the style is the same as is 10 characters, Numbers increase write characters

How to write a regular expression to capture this piece of string B073WKJ67W

Var regex=/\ [0-9] [a-z] {10} \//g;

I have written but cannot verify, great god help me to write the trouble, thank you,

CodePudding user response:

By the results of/separation, array the second element is not ok?

CodePudding user response:

CodePudding user response:

CodePudding user response:

 
Var STR="Husband - Pillow - Detachable - Removable - Adjustable/B073WKJ67W/ref=cm_cr_arp_d_rvw_fmt? Ie=UTF8 & amp; FormatType=current_format ";
Var result=/(? <=\/) [0-9 a-z] {10} (?=\/)/exec (STR);
Alert (result);
  • Related