If you wanna check for that string in the name you can use:
find(LayoutName, string)
ex: find("1ABCDx2", "x2") would return 5.
If you wanna get the string from the name you can use one of the expressions below:
left(LayoutName, count)
right(LayoutName, count)
mid(LayoutName, index, count)
ex:
left("1ABCDx2", 1) would return "1".
right("1ABCDx2", 2) would return "x2".
mid("1ABCDx2", 1, 2) would return "AB".
And you could even use both together:
mid("1ABCDx2", find("1ABCDx2", "A"), 2) would return "AB".