-
-
Save htammen/e79b3bc4a68f52af86c30b9d143c9566 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/werowizafe
This file contains 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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
let oBindingPath = "/ZLCT_CONTRACT_LISTSet(Zcontrnbr='AR00000031',Zcondlfd='0001')"; | |
// the binding path is something like this: "/ZLCT_CONTRACT_LISTSet(Zcontrnbr='AR00000031',Zcondlfd='0001')" | |
let rBindingPath = /^\/\w+\(Zcontrnbr='(\w+)',Zcondlfd='(\w+)'\)/g; | |
let match = rBindingPath.exec(oBindingPath); | |
if(match) { | |
let zcontrnbr = match[1]; | |
let zcondfld = match[2]; | |
console.log(zcontrnbr); | |
console.log(zcondfld); | |
} else { | |
console.log("No match found") | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">let oBindingPath = "/ZLCT_CONTRACT_LISTSet(Zcontrnbr='AR00000031',Zcondlfd='0001')"; | |
// the binding path is something like this: "/ZLCT_CONTRACT_LISTSet(Zcontrnbr='AR00000031',Zcondlfd='0001')" | |
let rBindingPath = /^\/\w+\(Zcontrnbr='(\w+)',Zcondlfd='(\w+)'\)/g; | |
let match = rBindingPath.exec(oBindingPath); | |
if(match) { | |
let zcontrnbr = match[1]; | |
let zcondfld = match[2]; | |
console.log(zcontrnbr); | |
console.log(zcondfld); | |
} else { | |
console.log("No match found") | |
} | |
</script></body> | |
</html> |
This file contains 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
let oBindingPath = "/ZLCT_CONTRACT_LISTSet(Zcontrnbr='AR00000031',Zcondlfd='0001')"; | |
// the binding path is something like this: "/ZLCT_CONTRACT_LISTSet(Zcontrnbr='AR00000031',Zcondlfd='0001')" | |
let rBindingPath = /^\/\w+\(Zcontrnbr='(\w+)',Zcondlfd='(\w+)'\)/g; | |
let match = rBindingPath.exec(oBindingPath); | |
if(match) { | |
let zcontrnbr = match[1]; | |
let zcondfld = match[2]; | |
console.log(zcontrnbr); | |
console.log(zcondfld); | |
} else { | |
console.log("No match found") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment