import re

for elm in elms: 
    thumb = $elm.$(a).txt 

if = in  line:
    opcode = 'mv'
    op1, op2 = line.split("=")

def lx_line(line, stack):

    # Define the regex pattern
    pattern = (
        r'(\$?\w+)'        # Match a variable name, optionally starting with $
        r'(\.[^=:]+)?'     # Match an optional property (e.g., .property)
        r'\s*([=:])\s*'    # Match an equals or colon sign with optional whitespace
        r'(\$?[^.]+)'      # Match a value, optionally starting with $
        r'(\..+)?'         # Match an optional additional property
    )

    matches = re.findall(pattern, line)

    if matches:
        OP1, OP1M, opcode, OP2, OP2M = matches[0]
        # Now you can use OP1, OP1M, opcode, OP2, OP2M as needed
    else:
        OP1, OP1M, opcode, OP2, OP2M = None,None, None,None,None
        print("No matches found.")

    #OP1 
    
    if OP2.startswith('#', '$(', '$['):
        v = jq('OP2')
    elif OP2.startswith('$'):
        v = stack.get(OP2)
        if OP2M.startswith('#', '$(', '$['):
            v = jq(v, OP2M)

    #OP2 
    if OP1.startswith('#', '$(', '$['):
        jq('OP1') = v 

    elif OP1.startswith('$'):
        v = stack.get(OP1)
        if OP1M.startswith('#', '$(', '$['):
            jq(v, OP1M) = v 
        else: 
            v = 