I would like a regex to match the first letter of every word in a string.
I am using the XRegExp Javascript library.
I am actually trying to copy a regex I have in my server-side C# code (seemingly working fine):
new Regex(@"\b[\p{L}]|(?<=[-])[\p{L}]").[omitted code]
Starting small, I have tried the following:
XRegExp.exec("foo bar", XRegExp("\\b\\p{L}", "g"))
I expected ["f","b"]
(using the 'all matches' flag (g), but only got: ["f"]
What am I doing wrong?