Skip to content

Commit

Permalink
숨어있는 숫자의 덧셈 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudwns committed May 8, 2023
1 parent 649e790 commit 0a3c013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Programmers/exam68.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function solution(my_string) {
let answer = 0;
const regex = /[a-zA-z]/gi;
const regex = /[a-z]/gi;
let str = my_string.replaceAll(regex, " ").split(" ");
str.forEach((v) => (Number(v) ? (answer += Number(v)) : null));
return answer;
Expand Down

0 comments on commit 0a3c013

Please sign in to comment.