Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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;

}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript on window resize 
Javascript :: generate component in angular 
Javascript :: jquery on form submit call function 
Javascript :: read xlsx file in angular 5 
Javascript :: quotation marks javascript 
Javascript :: patch request javascript 
Javascript :: replace many chracters js 
Javascript :: react js date ago 
Javascript :: how to set env variables in js 
Javascript :: javascript write to text file 
Javascript :: js merge objects 
Javascript :: convert json to dataframe 
Javascript :: javascript format date to dd-mm-yyyy 
Javascript :: get left position based on container jquery 
Javascript :: Uncaught TypeError: .replace is not a function 
Javascript :: regex remove spaces 
Javascript :: settimeout function es6 
Javascript :: suppress spaces in front and in the end of a string javascript 
Javascript :: chrome.storage.local get 
Javascript :: fromcharcode in javascript 
Javascript :: upload image react 
Javascript :: loop through array in javascript 
Javascript :: install vue js 
Javascript :: componentwillunmount 
Javascript :: regex expression to match domain name 
Javascript :: lookup in mongodb array 
Javascript :: preload 
Javascript :: get the state of a checkbox 
Javascript :: run onclick function once js 
Javascript :: vue router refresh page not found 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =