Skip to content

rajeevdesai/vpa-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vpa-regex Build Status npm

VPA Regex Pattern returns a regex that matches Virtual Payment Address (VPA). Use it for picking up VPA's.

Install

$ npm install vpa-regex

Usage

const vpaRegex = require('vpa-regex');

// Contains a vpa
'siddharth@ybl has requested ₹500'.match(vpaRegex());
//=> ['siddharth@ybl']

'You have paid ₹500 to siddharth@ybl'.match(vpaRegex());
//=> ['siddharth@ybl']

//Doesn't contain vpa
'Contact us at support@generic.com'.match(vpaRegex());
//=> []

License

MIT