A regular expression to match a string, for example:
"<any_string>+<any_string>+<any_string>"?
It sounds as simple as:
.*\+.*\+.*
.*matches any_string until the character \+matches the "+" character.
.*
\+
here is a non-regular way. In your favorite language, divide by "+", check the length of the array as 3. pseudocode:
s = split(mystring,"+") if length(s) = 3 then ..... end if
To be more precise, divide by "> + <"
S+S+S, S - , < > (, ) :
S+S+S
S
<
>
(<[^>]*>)\+\1\+\1
, :
<a>+<a>+<a>
<a>+<b>+<a>
S < >; +. , :
+
<a+b>+<a+b>+<a+b>
, ?
[\w\\+]*
,
/.*\+.*\+.*/
any_string >, , :
any_string
<([^>]+)>\+<([^>]+)>\+<([^>]+)>
$1, $2 $3 1, 2 3 . - ([^>]+) ([^>]*), < >.
$1
$2
$3
([^>]+)
([^>]*)
Source: https://habr.com/ru/post/1734368/More articles:Using ClientBundle Image Resources in css URLs - cssIs it possible or even logical to download the executable from the SQL server through .NET? - c #How to parse a string for a specific delimited section in PHP? - phpDeploy COM for VISTA - windowsjava эффективное удаление дубликатов - javaIs VisualStudio 2010 built with WPF / XAML? - .netSelect a specific tab in TabActivity from PendingIntent sent from notification - androidClone an object $ this - objecthow to convert decimal points? - functionHow to enable the zoom in / out option in UIWebView? - iphoneAll Articles