Regex string match?
Posted
by
Andy
on Stack Overflow
See other posts from Stack Overflow
or by Andy
Published on 2012-05-31T04:13:01Z
Indexed on
2012/05/31
4:40 UTC
Read the original article
Hit count: 268
I have a long string in javascript like
var string = 'abc234832748374asdf7943278934haskhjdasfhjkdfas83421def8923487234897234897';
I am trying to match like
abc234832748374
and def8923487234897
- that is - I have tried like
string.match(\abc[^abc]|\def[^def]|)
but that doesnt get me both strings because I need numbers after them ?
Basically I need abc
+ 8 chars after and def
the 8-11 chars after ? How can I do this ?
© Stack Overflow or respective owner