^.+\\(.*\\)
I am struggling to work this one out, any help would be greatly appreciated...
also is there a site that lets youu paste in a regular expression then spits out in plain text what it means?
^.+\\(.*\\)
I am struggling to work this one out, any help would be greatly appreciated...
also is there a site that lets youu paste in a regular expression then spits out in plain text what it means?
Then, there are two possibilities for \\( and \\):
^ text starts with . any character + 1 or more instances \\ \ character ( group start * 0 or more characters ) group end
So.. The string starts with several any characters followed by \ followed by optinally several any characters followed by \
^
Start at the beginning of the string
.+
Match one or more of any kind of character (except newline)
\\
Literal backslash
(
Start group
.*
Zero or more of any kind of character (except newline)
\\
Literal backslash
)
End group
After matching, the captured group will have a backslash and any number of characters after it.
also is there a site that lets youu paste in a regular expression then spits out in plain text what it means?
For instance the Regular Expression Analyzer gives this result for your regex ^.+\\(.*\\)
:
Sequence: match all of the followings in order
BeginOfLine
Repeat
AnyCharacterExcept\n
one or more times
(
Repeat
AnyCharacterExcept\n
zero or more times
)
Others have already described it's components, so I'll give you some examples - allthough I'm not sure what \\(
and \\)
stands for. It depends on your regexp-engine. If they match literal parenthesis, this regexp will match the following strings:
abc(def)
abcdef()
but won't match these:
abc
(abc)
abc(def)ghi
(abc)def
In case they match literal slashes and open/close a group, your regexp will match:
abc\def\