#regex #google-sheets-formula
Вопрос:
У меня есть блок текста
➤ What is your Linkedin profile URL if you have not connected with on Linkedin?: test url
another
yet another
Need to make changes to this event?
Где мне нужно извлечь текст
**EXPECTED RESULT:**
test url
another
yet another
Я пробовал с
=trim(REGEXEXTRACT($C$4,"n.*➤ What is your Linkedin profile URL if you have not connected with on Linkedin?:(.*)Need to make changes to event?"))
Ответ №1:
Вы можете использовать
(?s)➤s Whats iss yours Linkedins profiles URLs ifs yous haves nots connecteds withs ons Linkedin?:(.*)Needs tos makes changess tos thiss event?
Смотрите эту демонстрацию регулярных выражений.
Подробные сведения:
(?s)
— флаг модификатора одиночной строки, который.
сопоставляет любые символы разрыва строки➤s
—➤
и один или несколько символов пробеловWhats iss yours Linkedins profiles URLs ifs yous haves nots connecteds withs ons Linkedin?:
— литеральнаяWhat is your Linkedin profile URL if you have not connected with on Linkedin?:
строка с одним или несколькими пробелами между словами(.*)
— Группа 1: любые нулевые или более символов, как можно большеNeeds tos makes changess tos thiss event?
— литералNeed to make changes to this event?
с одним или несколькими пробелами между словами.