Skip to content

Commit d66ddc9

Browse files
committed
Update documentation
1 parent 5e98236 commit d66ddc9

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ $ npm install --save credit-card-regex
1313
```js
1414
var creditCardRegex = require('credit-card-regex');
1515

16-
creditCardRegex().test('6011881485017922');
16+
creditCardRegex().test('6011881485017922 foo bar');
1717
//=> true
1818

19-
creditCardRegex().exec('Credit card number: 6011881485017922')[0].trim();
20-
//=> 6011881485017922
19+
creditCardRegex({exact: true}).test('6011881485017922 foo bar');
20+
//=> false
2121

22-
'Multiple 5441068611005540 6011881485017922 numbers'.match(creditCardRegex());
23-
//=> ['5441068611005540', '6011881485017922']
22+
creditCardRegex({exact: true}).test('6011881485017922');
23+
//=> true
24+
25+
'foo 6011881485017922 bar 5441068611005540'.match(creditCardRegex());
26+
//=> ['6011881485017922', '5441068611005540']
2427
```
2528

2629
## License

0 commit comments

Comments
 (0)