I have a string
string name = \"AL QADEER UR AL REHMAN AL KHALIL UN\";
How would I remove all characters AL, UR,
I am loading that list from database, and can be change any time, how do use this in regex when changes occur
okay then, the length would always be 2?
no, but not be greater than 4
public static void Main()
{
var input = "AL QADEER UR AL REHMAN AL KHALIL UN AAA BBB";
Regex re = new Regex(@"\b\w{1,4}\b");
var result = re.Replace(input, "");
Console.WriteLine(result);
}
OUTPUT:
QADEER REHMAN KHALIL
dotNetFiddle