Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "use strict";
- var re = /^[a-z]{1}([a-z]{1})/im;
- function getEnv(hostname){
- var OK = hostname.match(re);
- if (!OK)
- console.log(`No regex match for ${hostname}`);
- else
- console.log(`Matched: ${OK[0]}`);
- }
- getEnv( process.argv[2] || 'ldserver01' );
Advertisement
Add Comment
Please, Sign In to add comment