blood group regex
const validBloodGroupRegex = /^(A|B|AB|O)[+-]$/i; // Here i is to ignore case sensitivity
const validBloodGroupString = 'AB+';
const invalidBloodGroupString = 'BC+';
// Returns true
console.log(validBloodGroupRegex.test(validBloodGroupString))
// Returns false
console.log(validBloodGroupRegex.test(invalidBloodGroupString))
Also in JavaScript:
- how do I use const in javascript
- javascript write to firebase
- cambiar background image javascript
- express.json vs bodyparser.json
- animejs reduce the speed
- what does componentDidCatch do in react
- jspdf reduce size file
- react how to export component
- remove a user from a reaction discord.js
- javascript sort multidimensional array
- example of validating fields on your own in express
- chartts js 2 y axes label
- js generator
- add select option jquery
- react hook usestate
- angular get name of component
- react cloud foundry 404proxy
- jquery select element with data
- how to console.log nested objects js
- functions in javascript
- loop an array in javascript
- javascript get width of a div
- user input through js
- hmac_sha256 node