如何在dart中将字符串分成键/值对?该字符串用import re
def repl(s):
return '#' * len(s)
some_string = 'This is text blah,other text blahhhh and more text'
some_regex = r'(blah+)'
split = re.split(some_regex,some_string)
for i in range(0,len(split),2): # every other element is between the matches
split[i] = repl(split[i])
new_string = ''.join(split)
print(new_string)
分隔。以及如何提取对值?
"="