I am new to python and trying to call arguments of one function into another script. But I keep getting error. Below is the code: the input is a text file for the below function.
script1.py
def regex_parameters(value, arg):
a = re.search(r'\d{1}-\d{1}', value)
b = re.search(r'\d{1}-\d{1}', value)
c = re.search(r'\d{1,4}( \w+){1,6},( \w+){1,3}\s\d{1,6}', value)
d = re.search(r'\(?\b[2-9][0-9]{2}\)?[-. ]?[2-9][0-9]{2}[-. ]?[0-9]{4}\b', value)
date = re.search(r'[A-z]{3,10}\s\d{1,2},\s\d{4}', value)
return(value, arg)
script2.py
import script 1
from script1 import *
for i in arg:
identity = regex_parameters(value, i)
if value is not None:
print(i, ":", value.group())
else:
clean = ""
i would like the output to be:
a = output of regex
b = output of regex
any help is much appreciated.