I’m assuming that when you type Carl in B,
C shows:
Carl Jones (1), Carl Jones (2), Carl Smith…
but also:
Carlos Esperanz, Carla Rogers, Geoff Carlston…
The expression for C’s sourceText:
names = thisComp.layer("A").text.sourceText.replace("\u200B","").split(","); // this makes it an Array, (after removing any invisible spaces)
word = thisComp.layer("B").text.sourceText.value;
regex = new RegExp(word, "gi"); // ,"i" makes it a case insensitive search
if (word.length > 0) {
names
.filter(a => a.match(regex)) // only array elements that match the word
.map(a => a.trim().replace(regex, "\u200B$&\u200B")) // trim extra whitespace, then surround the found queries with invisible spaces
.join("\r"); // turns the array into a string
} else {
"";
}
Now, you can’t set the styling of individual characters, so we have to faux our faux bold with a text animator. That’s why we inserted the invisible spaces (Unicode character 200B = “\u200B”) around every match we want to highlight.
Paste these keyframes on the layer C, and resulting Animator should be a “faux bold”
Adobe After Effects 8.0 Keyframe Data
Units Per Second 30
Source Width 1
Source Height 1
Source Pixel Aspect Ratio 1
Comp Pixel Aspect Ratio 1
Text Animators Animator #1 Selectors Expression Selector #1 Amount
Frame X percent Y percent Z percent
100 100 100
Expression Data
txt=text.sourceText.value.replace(/\r/g,""); // text without line breaks because the textIndex doesn't count them as a character
sel=false;
for (i=1; i<textindex; i++)="" {<br=""> if (txt[i-1]=="\u200B") sel = !sel;
}
sel && txt[i-1]!="\u200B" ? 100 : 0;
End of Expression Data
Text Animators Animator #1 Selectors Expression Selector #1 Based On
Frame
1
Text Animators Animator #1 Properties Stroke Color
Frame alpha red green blue
255 255 0 0
Expression Data
rgb=text.sourceText.style.fillColor;
rgb.push(1);
rgb;
End of Expression Data
Text Animators Animator #1 Properties Stroke Width
Frame
10
Expression Data
text.sourceText.style.fontSize/24;
End of Expression Data
Text Animators Animator #1 Properties Tracking Amount
Frame
0.8
Text Animators Animator #1 Properties Tracking Type
Frame
3
Text Animators Animator #1 Properties Stroke Opacity
Frame percent
100
Expression Data
100
End of Expression Data
End of Keyframe Data</textindex;>