You are trying to use alternative lists in a regex, but instead you are using a character class ("[\\baddAction\\b|\\bintentFilter\\b]
). With a character class, all characters in it are matched individually, not as a given sequence.
You learnt the word boundary, you need to also learn how grouping works.
You have a structure: word characters + word in double quotes and parentheses.
So, you need to group the first ones, and it is better done with a non-capturing group, and remove some word boundaries from the word
(it is redundant in the specified context):
String rgx ="\\b(?:addAction|intentFilter)\\b\\s*\\(\"\\s*word\\s*\"\\)";
System.out.println("addAction(\"word\")".matches(rgx));
System.out.println("intentFilter(\"word\")".matches(rgx));
Output of the demo
true
true