Current location - Education and Training Encyclopedia - Resume - If it is a string "(lksjdf)", how to remove the characters in brackets? Write in c language or use regular expressions.
If it is a string "(lksjdf)", how to remove the characters in brackets? Write in c language or use regular expressions.
For your string, Canonical can write like this:

\((.+)\)

or

^\((.+)\)$

or

^\((\w+)\)$

Note: If the processing content changes, regularization should also be modified.

C language, don't write, because there is no normalization processing efficiency.

If you are interested, you can go and see:

Learning experience of crifan regular expression

I don't want to post the address here. Please Google the title yourself and you will find the post address. )