PROGRAMMING:Bracket matching detection
Write a program to detect the input string containing large, medium and small brackets to see if the brackets match.
Note: 1) only handle bracket matching, other characters should be ignored.
2) Bracket matching refers to (and), [and], and {always matches}.
3) It can be assumed that the length of the string does not exceed 100.
4) When the brackets match, return the total logarithm (total number of pairs of left and right brackets), otherwise output 0.
###Input sample 1:
```in
{[(a+b)*(c-d)-e]}*[x+y]
```
###Output sample 1:
```out
five
```
###Input sample 2:
```in
[a+b)*(c-d];
```
###Output sample 2:
```out
0
```
answer:If there is no answer, please comment
Note: 1) only handle bracket matching, other characters should be ignored.
2) Bracket matching refers to (and), [and], and {always matches}.
3) It can be assumed that the length of the string does not exceed 100.
4) When the brackets match, return the total logarithm (total number of pairs of left and right brackets), otherwise output 0.
###Input sample 1:
```in
{[(a+b)*(c-d)-e]}*[x+y]
```
###Output sample 1:
```out
five
```
###Input sample 2:
```in
[a+b)*(c-d];
```
###Output sample 2:
```out
0
```
answer:If there is no answer, please comment