#chatGPT
Автор: Vincent Vauban
Загружено: 2023-01-28
Просмотров: 60
Описание:
ChatGPT is a large language model developed by OpenAI that is trained on a massive dataset of conversational text. It uses a transformer-based neural network architecture and can generate human-like text in a variety of contexts, including answering questions, summarizing text, and writing creative fiction. It can also be fine-tuned for specific tasks such as language translation, conversation generation, and text completion.
I asked chatGPT👇
Generate a SprinBoot JUnit test asserting a regex that contains only letters, or dashes, or dots, or spaces?
It answered👇
import org.junit.Assert;
import org.junit.Test;
public class RegexTest {
private static final String regex = "[a-zA-Z\\-\\.\\s]*";
@Test
public void testRegex() {
Assert.assertTrue("abc-def.ghi ijk".matches(regex));
Assert.assertTrue("abcdefghijk".matches(regex));
Assert.assertTrue("".matches(regex));
Assert.assertFalse("123".matches(regex));
Assert.assertFalse("abc-def.ghi ijk123".matches(regex));
}
}
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: