get string after character javascript
const str = '01-01-2020';
// get everything after first dash
const slug = str.substring(str.indexOf('-') + 1); // 01-2020
// get everything after last dash
const slug = str.split('-').pop(); // 2020var val = 'asdasd:111122:123123123';
var response = val.substring(val.indexOf(":"));
alert(response); // ":111122:123123123"
Also in JavaScript:
- javascript square root
- javascript boolean change value
- jquery datepicker
- convert number to indian rupee format in javascript
- how to split two digit number in javascript
- js functions inside of objects
- The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://localhost')
- how to check if json data is received in ajax response
- js switch
- react cheat sheets
- javascript truncate string full word
- jquery attr value get
- js for loops
- react native list view
- jquery fadein
- nextjs svg npm
- crypto node
- how do I make and animation start on click in js
- play audio in javascript
- js variable to string
- mongodb replace document
- fullcalendar angular add events
- javascript remove last child element
- adding numbers in an array javascript