I have a strings in a dataframe in the following format.
abc.T01.xyz
abc.def.T01.xyz
abc.def.ghi.xyz
I need to filter the rows where this string has values matching this expression.
[a-zA-Z].T[0-9].[a-zA-Z]
I have used the following command, but it is giving me the strings that look like this as well: [a-zA-Z].[a-zA-Z].T[0-9].[a-zA-Z] which I don't want in my result.
mydf2 = mydf1.where('col1 rlike ".*\.T.*\..*"')
mydf2.show()
I am missing something in my regex.