Thank you for the clarification - please see the attached, I duplicated your tables so I could rename and you could see what I was doing with them.
The solution is in the tabled titled “eDNA Fact”, and in the table code I added a reference to the post from Imke Feldman where I grabbed the original logic.
let
Source = "Hi i am a bad boy the is thanks to match",
#"Converted to Table" = #table(1, {{Source}}),
#"Replacement Function" =
let
//custom function thanks to Imke Feldmann
//https://www.thebiccountant.com/2016/05/22/multiple-replacements-in-power-bi-and-power-query/
Source1 = ReplacementsTable,
CreateListOfLists = Table.AddColumn(Source1, "List", each ({[U], [B]})),
Text = #"Converted to Table",
TurnTextToList = Table.AddColumn(Text, "Custom", each Text.Split([Column1], " ")),
Replacements = Table.AddColumn(TurnTextToList, "Changed Text Expected",
each Text.Combine(List.ReplaceMatchingItems([Custom],CreateListOfLists[List])," ")),
Cleanup = Table.RemoveColumns(Replacements,{"Custom"})
in
Cleanup
in
#"Replacement Function"
eDNA Solution - StopWords.pbix (32.4 KB)