Find a vowel at the begining and end with regular expression
// ^ => first item matches:
// () => stores matching value captured within
// [aeiou] => matches any of the characters in the brackets
// . => matches any character:
// + => for 1 or more occurrances (this ensures str length > 3)
// \1 => matches to previously stored match.
// \2 looks for matched item stored 2 instances ago
// \3 looks for matched item stored 3 ago, etc
// $ ensures that matched item is at end of the sequence
let re = /^([aeiou]).*\1$/i;
return re;
}
Also in JavaScript:
- how to make and add to an array in javascript
- javascript iterate through a binary tree
- add variable inside regex in javascript
- react component example
- onclick open link js
- codeceptjs "waitForClickable"
- js remove last character
- angular component lifecycle hooks
- jquery function
- how to set time out in js
- jquery scroll to top of div animate
- how to get textedit on mac without download
- js class async constructor
- nesting in Jinja2 expressions
- what is angularjs
- create react app and tailwind
- javascript remove character from string
- mongodb readwrite to all dbs
- console log add new line
- how to set input of time type to current time on initialization
- react native AsyncStorage
- Module build failed: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (79)
- devexpress custom column field
- parse local json file