- Регистрация
- 20.04.2015
- Сообщения
- 6 052
- Благодарностей
- 6 481
- Баллы
- 113
помогите решить задачку, имеем исходник, для примера
нужно взять все значения, которые находятся между \n и \n
и выделить их нужными тегами, если в найденном значении слов меньше 10 (к примеру)
должно получиться так
Delicious Milk: A Guide to All Things Creamy\n\nMilk is a staple ingredient in many dishes, beverages, and desserts. From its creamy texture to its versatile taste, milk is a natural and essential ingredient in many recipes. But not all milk is created equal. Today, we'll be discussing the different types of milk, the benefits of drinking milk, and how to choose the best kind of milk for your needs.\n\n1. Skim Milk vs. Whole Milk: Which One is Better?\n\nSkim milk is a popular option for those who want to cut down on calories and fat. With its low-fat content, skim milk is ideal for those who want a healthier milk option. On the other hand, whole milk is creamier and fuller in taste. For those who want a more indulgent taste, whole milk is the way to go. However, it's essential to consider your health goals and calorie intake before choosing between skim and whole milk.\n\n2. Organic Milk: What You Need to Know\n\nOrganic milk is produced using strict guidelines that prohibit the use of synthetic pesticides, hormones, and antibiotics. Organic milk is an excellent option for those who want to avoid the additives and chemicals that may be found in conventional milk. However, it is crucial to note that organic milk is pricier than regular milk.\n\n3. Lactose-Free Milk: A Solution for Lactose Intolerance\n\nLactose intolerance is a common digestive issue that affects many people. For those who are lactose intolerant, drinking regular milk can cause stomach discomfort and digestive problems. Luckily, lactose-free milk is an alternative that allows people with lactose intolerance to enjoy milk without any negative side effects.
нужно взять все значения, которые находятся между \n и \n
и выделить их нужными тегами, если в найденном значении слов меньше 10 (к примеру)
должно получиться так
как можно такое реализовать, спасибо<teg>Delicious Milk: A Guide to All Things Creamy</teg>\n\nMilk is a staple ingredient in many dishes, beverages, and desserts. From its creamy texture to its versatile taste, milk is a natural and essential ingredient in many recipes. But not all milk is created equal. Today, we'll be discussing the different types of milk, the benefits of drinking milk, and how to choose the best kind of milk for your needs.\n\n<teg>1. Skim Milk vs. Whole Milk: Which One is Better?</teg>\n\nSkim milk is a popular option for those who want to cut down on calories and fat. With its low-fat content, skim milk is ideal for those who want a healthier milk option. On the other hand, whole milk is creamier and fuller in taste. For those who want a more indulgent taste, whole milk is the way to go. However, it's essential to consider your health goals and calorie intake before choosing between skim and whole milk.\n\n<teg>2. Organic Milk: What You Need to Know</teg>\n\nOrganic milk is produced using strict guidelines that prohibit the use of synthetic pesticides, hormones, and antibiotics. Organic milk is an excellent option for those who want to avoid the additives and chemicals that may be found in conventional milk. However, it is crucial to note that organic milk is pricier than regular milk.\n\n<teg>3. Lactose-Free Milk: A Solution for Lactose Intolerance</teg>\n\nLactose intolerance is a common digestive issue that affects many people. For those who are lactose intolerant, drinking regular milk can cause stomach discomfort and digestive problems. Luckily, lactose-free milk is an alternative that allows people with lactose intolerance to enjoy milk without any negative side effects.