这个正则表达式做了什么?

^.+\\(.*\\)

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?

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\
  • ^ is the start of line
  • . is any (non-newline) character
  • .+ is one or more of any (non-newline) character
  • .* is zero or more of any (non-newline) character

Then, there are two possibilities for \\( and \\):

  • \\ is a backslash, and ( opens a group.
  • \\( is a literal opening parenthesis.
^ 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

        one or more times
    (
    Repeat
        AnyCharacterExcept

        zero or more times
    )