regex - jQuery get substring from string having start and end substrings of substring -
so have string, lets one:
the quick brown fox jumps on lazy dog
and lets there jumping animal, not fox, string different. , need part of it, lets one
brown fox jumps
i know string starts "brown" , ends "jumps" suppose need regex solve this.
i thankful if explain structure of writing regex me, because far don't it.
just select word in between easiest one.
/(brown.*jumps)/i
or if select animal single word too:
/(brown (.*) jumps)/i
Comments
Post a Comment