I want to search and replace a string with regex,for example,use a regex \\[([^\\[\\]]*)\\] to get a part
\\[([^\\[\\]]*)\\]