diff --git a/src/helpers/regex.helper.ts b/src/helpers/regex.helper.ts index b96b9afb..52513520 100644 --- a/src/helpers/regex.helper.ts +++ b/src/helpers/regex.helper.ts @@ -1,4 +1,4 @@ // This helper function is used to convert the regex pattern to a string so that it can be used in the swagger documentation. export const regexToString = (regex: RegExp): string => { - return regex.toString().replace(/^\/|\/$/g, ''); + return regex.source; };