๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90

2022/์˜คํ”ˆ์†Œ์Šค ์†Œํ”„ํŠธ์›จ์–ด ํ”„๋กœ์ ํŠธ12

git branch ๋ณ‘ํ•ฉํ•˜๊ธฐ Event ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…์„ ํ•˜๋‹ค๊ฐ€ ์ด์ œ main ๋ธŒ๋žœ์น˜๋กœ mergeํ•ด์ฃผ๊ณ  ์‹ถ์œผ๋ฉด git checkout main => main ๋ธŒ๋žœ์น˜๋กœ์ด๋™ํ•ด์ฃผ๊ณ  git merge Event ํ•ด์ค€๋‹ค ๊ทธ๋ฆฌ๊ณ  commit ๋ 2022. 12. 1.
CE ๊ธฐ๋Šฅ ๊ตฌํ˜„ https://codechacha.com/ko/python-extract-integers-from-string/ Python - ๋ฌธ์ž์—ด์—์„œ ์ˆซ์ž๋งŒ ์ถ”์ถœํ•˜๋Š” ๋ฐฉ๋ฒ• String์—์„œ ์ˆซ์ž(Integer)๋งŒ ์ถ”์ถœํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค. `re.sub()`์˜ Syntax๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. string์—์„œ Pattern๊ณผ ์ผ์น˜ํ•˜๋Š” ๋ฌธ์ž๋“ค์ด repl์œผ๋กœ ๊ต์ฒด๋ฉ๋‹ˆ๋‹ค. `re.findall(pattern, string)`์€ string์—์„œ pattern์— codechacha.com ํ˜„์žฌ operation_solution์— ์žˆ๋Š” ์—ฐ์‚ฐ ์‹ ex) 5+2 ์ค‘์—์„œ ์—ฐ์‚ฐ๊ธฐํ˜ธ ๋’ค์— ์žˆ๋Š” ์ฆ‰ ํ˜„์žฌ ์ž…๋ ฅ๋œ ์ˆ˜๋งŒ ์ง€์›Œ์ฃผ์–ด์•ผํ•œ๋‹ค. ๋งŒ์•ฝ ์—ฐ์‚ฐ๊ธฐํ˜ธ ๋’ค์— ์ˆ˜๊ฐ€ ์—†๋‹ค๋ฉด ๊ทธ ์•ž์— ์ž…๋ ฅ๋œ ์ˆ˜๋ฅผ ์ง€์›Œ์ค€๋‹ค. ์ผ๋‹จ ์ˆ˜๋งŒ ์ง€์›Œ์ฃผ์–ด์•ผ ํ•œ๋‹ค. ### CE .. 2022. 11. 27.
= ๋ฒ„ํŠผ ์ด๋ฒคํŠธ ์‚ฌ์น™ ์—ฐ์‚ฐ์ด ์›ํ™œํ•˜๊ฒŒ ์ž‘๋™๋˜์–ด์•ผํ•œ๋‹ค. https://codechacha.com/ko/python-extract-integers-from-string/ Python - ๋ฌธ์ž์—ด์—์„œ ์ˆซ์ž๋งŒ ์ถ”์ถœํ•˜๋Š” ๋ฐฉ๋ฒ• String์—์„œ ์ˆซ์ž(Integer)๋งŒ ์ถ”์ถœํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค. `re.sub()`์˜ Syntax๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. string์—์„œ Pattern๊ณผ ์ผ์น˜ํ•˜๋Š” ๋ฌธ์ž๋“ค์ด repl์œผ๋กœ ๊ต์ฒด๋ฉ๋‹ˆ๋‹ค. `re.findall(pattern, string)`์€ string์—์„œ pattern์— codechacha.com http://daplus.net/python-float-%EA%B0%92%EC%9D%B4-%EC%A0%95%EC%88%98%EC%9D%B8%EC%A7%80-%ED%99%95%EC%9D%B8%ED%95%9.. 2022. 11. 27.
. ๋ฒ„ํŠผ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ์ˆ˜์ • .์ด ํ•œ ๋ฒˆ ๋ˆŒ๋ ธ๊ณ  operation_solution ์ฐฝ์— .์ด ์žˆ๋‹ค๋ฉด ๋”์ด์ƒ .๋ฒ„ํŠผ์„ ๋ˆŒ๋ ค๋„ ํ™”๋ฉด์— .๊ฐ€ ์ฐํžˆ์ง€ ์•Š๋„๋ก ํ•ด์•ผํ•œ๋‹ค. https://asecurity.dev/entry/Python-%ED%8A%B9%EC%A0%95-%EB%AC%B8%EC%9E%90%EC%97%B4str-%ED%8F%AC%ED%95%A8-%EC%9C%A0%EB%AC%B4contains-%ED%99%95%EC%9D%B8-%EB%B0%A9%EB%B2%95 Python - ํŠน์ • ๋ฌธ์ž์—ด(str) ํฌํ•จ ์œ ๋ฌด(contains) ํ™•์ธ ๋ฐฉ๋ฒ• ๋‹ค๋ฅธ ์–ธ์–ด(C#, Java๋“ฑ)์„ ์‚ฌ์šฉํ•˜๋‹ค Python์œผ๋กœ ์ „ํ™˜ํ•˜๋ฉด์„œ ๊ฐ€์žฅ ํ—ท๊ฐˆ๋ ธ๋˜ ๋ถ€๋ถ„์ด ๋ฌธ์ž์—ด ๊ฒ€์ƒ‰ ๋ถ€๋ถ„์ด๋‹ค. ๋ณดํ†ต C# ๊ธฐ์ค€์œผ๋กœ str์— .contains๋ฅผ ํ†ตํ•ด ํŠน์ • ๋ฌธ์ž์—ด์ด ํฌํ•จ ํ•˜๊ณ  ์žˆ๋Š”์ง€๋ฅผ .. 2022. 11. 27.
728x90