27 lines
810 B
Python
27 lines
810 B
Python
str0 = '''"it in the ..." in $['content']'''
|
|
|
|
str1 = '''"it in the ..." in $['content']'''
|
|
str2 = '''$['content'] == "ha in the end."'''
|
|
str3 = '''"it in the ..." in $'''
|
|
str4 = """$w.dasfd[9][0] in 'it in the ...'"""
|
|
str5 = '''$.flag == true'''
|
|
|
|
import re
|
|
|
|
|
|
str41 = """$w.dasfd[9][0] in 'it in the ...'"""
|
|
str42 = '''$w.dasfd[9][0] in "it in the ..."'''
|
|
str43 = """$w.dasfd['a']['vf'] in 'it in the ...'"""
|
|
str44 = """$w.dasfd['a']['vf in '] in true"""
|
|
str45 = """$null in true"""
|
|
str46 = "$w.dasfd['a']['vf in '] in \"true\""
|
|
|
|
|
|
s = str45
|
|
print(re.findall('[\"].*?[\"].*?[\s]*( in )[\s]*', s))
|
|
print(re.findall('[\'].*?[\'].*?[\s]*( in )[\s]*', s))
|
|
print(re.findall('[\s]*( in )[\s]*.*?[\"].*?[\"]', s))
|
|
print(re.findall('[\s]*( in )[\s]*.*?[\'].*?[\']', s))
|
|
# ?
|
|
# print(re.compile(' in ').sub(' IN ', str1))
|