I have a text box in which I need to check that at least one line contains ** at the beginning of it.
Examples
Line 1 Line 2 Line 3
INVALID
Line 1 **Line 2 Line 3
REALLY
**Line 1 Line 2 **Line 3
Is this possible with Regex?
Thanks in advance,
Marco
/^\*\*/m.test(textareaEl.value)
Flag mmeans multi-line mode. In this mode, it ^corresponds to the beginning of a line and the beginning of each line. We need to run away * like \*.
m
^
\*
Source: https://habr.com/ru/post/1752385/More articles:How to determine if an Exchange mail item is an automatic response? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1752381/is-there-any-need-to-set-a-member-string-variable-of-a-class-to&usg=ALkJrhj-w4k0I7FvE4QLUSB4RJrTVeW5DAКак ссылаться на внешние .jar файлы в TextMate - javaHow can I track the input position with multiple inputs using Boost :: Spirit :: Qi? - c ++DataMapper, how to create multiple records? - ruby | fooobar.comNamed_scope at least one in has_many association - ruby | fooobar.comRuby chain of responsibility and problems alias_method - ruby | fooobar.comИзбегание круговых зависимостей в XNA с использованием Ninject 2.0 - dependency-injectionКак добавить пользовательский элемент в контекстное меню chrome? - google-chromeHow to create a global array with a variable number of elements? - c ++All Articles