How do I replace anything that goes after certain character? For example:
var temp = 'abcdefghikj';
and I want to replace all characters with nothing after c
:
temp.replace('c*', '');
I looked at this topic but none of the suggested solutions worked for me: Regular Expressions- Match Anything