G
GCoder
Hi, I am relatively new to regex and have a simple question.
I want to find two words within a string (and everything in between to
the two words and replace it with something else.
The specific string is:
....[lots of
text]..................thumbnailUrl=xxxxxxxxxxxxxxxxx&..........................[more
text]
i want to snip out the everything in between and including
thumbnailUrl=
and the
&
and all the text in between the two words. The text between the two
words is not a constant number and contains the % sign.
This is what I was thinking but its not working properly:
foo = foo.replace(/[thumbnailUrl=.*]-[&]/i, 'replacement text');
Can someone please help??
I want to find two words within a string (and everything in between to
the two words and replace it with something else.
The specific string is:
....[lots of
text]..................thumbnailUrl=xxxxxxxxxxxxxxxxx&..........................[more
text]
i want to snip out the everything in between and including
thumbnailUrl=
and the
&
and all the text in between the two words. The text between the two
words is not a constant number and contains the % sign.
This is what I was thinking but its not working properly:
foo = foo.replace(/[thumbnailUrl=.*]-[&]/i, 'replacement text');
Can someone please help??