Find a regular expression

from a non-Chinese character to no more than 20 Chinese characters in a limited company or a limited liability company
must be all Chinese characters + parentheses (both Chinese and English parentheses are allowed, English, numbers, punctuation, spaces are never allowed)-sharp-sharp-sharp topic description

Dec.08,2021

/ ^ [u4e00-u9fa5a-zA-Z0-9] + $/


< H1 > I don't know whether to explore the way first < / H1 >
import re
s = "a@()() lkajsldkj@^ald"
ss = "a@()()lkajsldkj@^ald"


def isChina(text):
    """
     
    :param text:
    :return: True or False
    """
    return all('\u4e00' <= char <= '\u9fff' for char in text)

def getChinaIndex(test):
    """
    
    :param test:
    :return:
    """
    for i in range(len(s)):
        if isChina(text=s[i]):
            return i

s_1 = s[ getChinaIndex(s):]
ss_1 = ss[getChinaIndex(ss):]

print(s_1)
print(ss_1)
a_1 = re.findall("[\u4e00-\u9fa5()]+|",s_1)
a_2 = re.findall("[\u4e00-\u9fa5()]+[\b|\b]",ss_1)
print(a_1)
print(a_2)

result

() lkajsldkj@^ald
()lkajsldkj@^ald
['()']
['()']
Menu