T
teo
Hallo
I need to extract a subtext from a text.
The subtext must contain a given word.
The subtext bounds are:
vbCr (return)
vbLf (new line)
vbCrLf (return+new line)
the very beginning of the text
the very ending of the text
I tried with:
^
\n
\r
$
so to have:
Dim myText As String
Dim myPattern As String = "^\n\r" & myWord & "\n\r$"
Dim match As Match = Regex.Match(myText, myPattern, RegexOptions.Multiline
Or RegexOptions.IgnoreCase)
but I had problems.
I need to extract a subtext from a text.
The subtext must contain a given word.
The subtext bounds are:
vbCr (return)
vbLf (new line)
vbCrLf (return+new line)
the very beginning of the text
the very ending of the text
I tried with:
^
\n
\r
$
so to have:
Dim myText As String
Dim myPattern As String = "^\n\r" & myWord & "\n\r$"
Dim match As Match = Regex.Match(myText, myPattern, RegexOptions.Multiline
Or RegexOptions.IgnoreCase)
but I had problems.