From 8a9a95250f7c77cc40b7fc05efb53b1b67646ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B3=A0=EA=B2=BD=EC=88=98?= Date: Wed, 11 Feb 2026 22:53:42 +0900 Subject: [PATCH] fix(#383): sns --- .../dto/response/MyProfileCardResponseDto.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/RealMatch/user/presentation/dto/response/MyProfileCardResponseDto.java b/src/main/java/com/example/RealMatch/user/presentation/dto/response/MyProfileCardResponseDto.java index 874d1c73..a7dd717a 100644 --- a/src/main/java/com/example/RealMatch/user/presentation/dto/response/MyProfileCardResponseDto.java +++ b/src/main/java/com/example/RealMatch/user/presentation/dto/response/MyProfileCardResponseDto.java @@ -49,7 +49,11 @@ private static String extractInstagramAccount(String snsUrl) { if (snsUrl == null || snsUrl.isBlank()) { return ""; } - return snsUrl.replace("https://www.instagram.com/", "") - .replace("/", ""); + + return snsUrl + .replaceAll("https?://(www\\.)?instagram\\.com/", "") + .replaceAll("instagram\\.com", "") + .replaceAll("/", "") + .trim(); } }