Regular expression for matching base64 encoded strings
Install
$ npm install --save base64-regex
Usage
const base64Regex = ; ;//=> true ;//=> false ;//=> true 'foo dW5pY29ybg== bar Ym9hdA==';//=> ['dW5pY29ybg==', 'Ym9hdA==']
API
base64Regex([options])
Returns a regex for matching base64 encoded strings.
options
exact
Type: boolean
Default: false
(Matches any base64 in a string)
Only match an exact string. Useful with RegExp#test
to check if a string is a base64 encoded string.
License
MIT © Kevin Mårtensson