Regex match with mix of uppercase and lowercase letters

前端 未结 0 1374
甜味超标
甜味超标 2021-01-04 11:37

I\'m trying to extract the first uppercase letter from a string.

import re

# This works as expected
x = re.match(\'[A-Z]{1}\', \'ABCDEF\').group()
print(x) #         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题