I hereby claim:
- I am matthewnolan on github.
- I am matthewnolan (https://keybase.io/matthewnolan) on keybase.
- I have a public key ASCiPx5A3ul_FostuOuNd95vQP82YPxRmfgyfrxmYyUp9wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <!DOCTYPE html> | |
| <html class="no-js"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| function findPages (pages) { | |
| // usecase = "1-3,6,9"; | |
| if (typeof(pages) != "string"){ return }; // must be a string | |
| var splitUse = pages.split(",") // ["1-3","6","9"] | |
| var patt1 = new RegExp("-"); // search for - | |
| for (i=0;i < splitUse.length;i++) { | |
| if ( patt1.test(splitUse[i]) ){ // tests for "-" | |
| var newsub = splitUse[i].split("-"); | |
| for (n=newsub[0]; n<=newsub[1]; n++){ | |
| splitUse.push(n); // adds contents to end of array |