I use this #(\\s|^)([a-z0-9-_]+)#i
for capitalize every first letter every word, i want it also to capitalize the letter if it\'s after a special mark like a da
Here's my Python solution
>>> import re
>>> the_string = 'this is a test for stack-overflow'
>>> re.sub(r'(((?<=\s)|^|-)[a-z])', lambda x: x.group().upper(), the_string)
'This Is A Test For Stack-Overflow'
read about the "positive lookbehind" here: https://www.regular-expressions.info/lookaround.html