extract string from string javascript based on word

Solutions on MaxInterview for extract string from string javascript based on word by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "extract string from string javascript based on word"
Veronica
19 Jan 2018
1var str = '#anotherdata=value#iamlookingforthis=226885#id=101&start=1';
2var value = str.match(/#iamlookingforthis=(\d+)/i)[1];
3
4alert(value); // 226885