Created
July 9, 2014 12:01
-
-
Save miller3818/388fc187c079d6be3d52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RegEx that will slice the word that is between the two )('s | |
var myString = "this is something blah blah blah Host: shitballs stuff blah blah"; | |
//var myString = "something format_abc"; | |
var myRegexp = /(?:^|\s)Host: (.*?)(?:\s|$)/; | |
var match = myRegexp.exec(myString); | |
alert(match[1]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment