Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

regExp for finding a first letter and last letter in a string

var regex = /^(.).*1$/;

console.log(
  regex.test('abcdsa')
)
console.log(
  regex.test('abcdsaasaw')
)
 Run code snippetHide results
Comment

PREVIOUS NEXT
Code Example
Javascript :: try catch in javascript 
Javascript :: use jetbrains mono in vscode 
Javascript :: how to insert html in javascript 
Javascript :: nodejs write raw buffer to file 
Javascript :: regex validate double with 2 decimals 
Javascript :: dynamics js search another entity 
Javascript :: implementating step component in react 
Javascript :: how to change link href with javascript 
Javascript :: jquery add disabled to id 
Javascript :: scroll to bottom javascript 
Javascript :: javascript parse url parameters 
Javascript :: linking a script .js 
Javascript :: javascript get data attribute of selected option 
Javascript :: select option trigger in js 
Javascript :: sleep javascript 
Javascript :: bjsmasth 
Javascript :: webpack-bundle-analyzer no stats.json file 
Javascript :: react native image disable fade in onload 
Javascript :: Set node environment through package.json script 
Javascript :: how to do a classname variable and string react 
Javascript :: event listener for functional component 
Javascript :: gmail regex 
Javascript :: how to create a new react native project 
Javascript :: usestate hook for checkbox check and uncheck 
Javascript :: react native get route name 
Javascript :: vue check if list is empty 
Javascript :: javascript search like 
Javascript :: use js variable in blade route 
Javascript :: round a number to fixed decimals 
Javascript :: react fontawesome 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =