lrr81765
asked on
RegEx replace upper case
Given
Sum(ItemOne + ItemTwo + ItemThree)
CalcLate( something0
I need to have javascript that would look at all of the characters before the ( and replace them with toLower().
I'd like to do this with the replace (regex, replacement) but can't seem to get the regex to work.
Sum(ItemOne + ItemTwo + ItemThree)
CalcLate( something0
I need to have javascript that would look at all of the characters before the ( and replace them with toLower().
I'd like to do this with the replace (regex, replacement) but can't seem to get the regex to work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why is this question still open? Do you need more help or some explanations?
<script>
myText = "Sum(ItemOne + ItemTwo + ItemThree)\nCalcLate( something0";
alert(myText.replace(/\w+\
</script>