I got an error while validating pan card number.
Error : _() got an unexpected keyword argument 'regex'
I used the following code
import pandas as pd
import numpy as np
from re import *
pannoDF['pannoDF'] = np.where(pannoDF.PAN_NO.str.contains(r"^[A-Z]{5}\d{4}[A-Z]$",regex=True), 'Valid PAN' , 'is not valid PAN number')
spark version - '3.2.1'
can you please suggest the solution?