Advertisement
indraai

indra-inspire-creative-future-1532295821493

Jul 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. working on new features to extract strings out of strings for content packets inside the data packets. From here we want to extract strings between strings and then add urls to the ends for things. let's give it a try.
  2.  
  3. ```javascript
  4. const STR = 'some other text before the extract #tweet hello this is the middle string of the extractor\n';
  5. const extract = STR.split('#tweet ')[1].split('\n')[0].trim();
  6. console.log(extract);
  7. ```
  8. this will extract the string and place the first value text into a extract variable.
  9.  
  10. #tweet paste bin on simple extraction of values by splitting into arrays. sometimes faster than using a regex. #Indra #IndraAI #Coding
  11.  
  12. this it should clear at the line breaks.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement