unwanted log

This commit is contained in:
Andrzej Stepien 2023-08-09 17:32:53 +02:00
parent 339fe2cd19
commit 6d68ebea4c
2 changed files with 1 additions and 2 deletions

View File

@ -40,7 +40,7 @@ export default async function getNewPrompt({ minCount = 200000, maxCount = 30000
console.dir(await getNewPrompt({})) //console.dir(await getNewPrompt({}))

View File

@ -46,4 +46,3 @@ return text+meaningsText+postScript
function removeUrls(string){ function removeUrls(string){
return string.replace(/(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z]{2,}(\.[a-zA-Z]{2,})(\.[a-zA-Z]{2,})?\/[a-zA-Z0-9]{2,}|((https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z]{2,}(\.[a-zA-Z]{2,})(\.[a-zA-Z]{2,})?)|(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z0-9]{2,}\.[a-zA-Z0-9]{2,}\.[a-zA-Z0-9]{2,}(\.[a-zA-Z0-9]{2,})?/g, '') return string.replace(/(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z]{2,}(\.[a-zA-Z]{2,})(\.[a-zA-Z]{2,})?\/[a-zA-Z0-9]{2,}|((https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z]{2,}(\.[a-zA-Z]{2,})(\.[a-zA-Z]{2,})?)|(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z0-9]{2,}\.[a-zA-Z0-9]{2,}\.[a-zA-Z0-9]{2,}(\.[a-zA-Z0-9]{2,})?/g, '')
} }
console.log(removeUrls("Hello there newgrounds.com www.poopants.org this is http://localhost:80 working as intended."))