I have an input
SourceName = AND THE ABC LIMITED
In asset i have values like AND, THE
In loop i am accessing these asset values and checking in input that any words contains AND or THE present in the SourceName.
If they are present it should remove AND & THE. If any one is there it will remove accordingly. I am using the below code which removed only AND not THE
System.Text.RegularExpressions.Regex.Replace(InputName,“^(”+string.Join(“|”,item.ToString.Split(“,“c))+”,”")
Kindly provide your inputs in this regard.
In Asset values are - THE,AND
Thats y used - item.ToString.Split(",“c))
Let me know if i need to do a code change.
The asset value will be added further or can be removed also THE,AND,WAS…(will be updated by the user so its dynamic). Input and asset values are in below order.
Input - AND THE ABC THE AND LIMITED
Asset contains - THE,AND
Expected output - ABC THE AND LIMITED
Actual outout is - THE ABC THE AND LIMITED
Also we need to ensure that if relevant values in asset falls in between ABC LIMITED should not be removed.