A Pen by Captain Anonymous on CodePen.
Last active
August 29, 2015 14:22
-
-
Save dragonken/3559bdff265c339f20e6 to your computer and use it in GitHub Desktop.
wagXgQ
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
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> | |
<!-- Latest compiled and minified JavaScript --> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<div class="content"> | |
<div class="panel panel-primary"> | |
<div class="panel panel-heading">Input</div> | |
<div class="panel panel-body"> | |
<ul> | |
<li>HK$3,003,500.00</li> | |
<li>HK$3,500.00</li> | |
<li>HK$3500.00</li> | |
<li>$3500.00</li> | |
<li>$3500</li> | |
<li>$300 AUD</li> | |
</ul> | |
</div> | |
</div> | |
<div class="panel panel-primary"> | |
<div class="panel panel-heading">Output</div> | |
<div class="panel panel-body"> | |
<div class="output"></div> | |
</div> | |
</div> | |
</div> |
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
function getAllPrice() { | |
var markup = document.documentElement.innerHTML; | |
var arr=markup.match(/(HKD|USD|AUD)?(HK|US|AU)?\s*\$((\d+),?)+\.?\d{0,2}\s*(HKD|USD|AUD)?(HK|US|AU)?/ig); | |
return arr; | |
} | |
console.log(getAllPrice()); | |
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
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
<!-- Optional theme --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> | |
<!-- Latest compiled and minified JavaScript --> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<div class="content"> | |
<div class="panel panel-primary"> | |
<div class="panel panel-heading">Input</div> | |
<div class="panel panel-body"> | |
<ul> | |
<li>HK$3,003,500.00</li> | |
<li>HK$3,500.00</li> | |
<li>HK$3500.00</li> | |
<li>$3500.00</li> | |
<li>$3500</li> | |
<li>$300 AUD</li> | |
</ul> | |
</div> | |
</div> | |
<div class="panel panel-primary"> | |
<div class="panel panel-heading">Output</div> | |
<div class="panel panel-body"> | |
<div class="output"></div> | |
</div> | |
</div> | |
</div> |
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
function getAllPrice() { | |
var markup = document.documentElement.innerHTML; | |
var arr=markup.match(/(HKD|USD|AUD)?(HK|US|AU)?\s*\$((\d+),?)+\.?\d{0,2}\s*(HKD|USD|AUD)?(HK|US|AU)?/ig); | |
return arr; | |
} | |
console.log(getAllPrice()); | |
A Pen by Captain Anonymous on CodePen.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment