Quote:
Originally Posted by Buchstabensalat
Hi,
Thank you.
Using Sigil`s search (regex mode) your first string finds every single word in the text, the second string matches every uppercase word in my text and not only those that meet my search criteria ( uppercase letter(s) within a word). Is there a possiblity to match only those words with upercase letters in the word ?
Thanks again
Regards,
Buchstabensalat
|
I would use the following:
Find:
Code:
\b(\p{L})((?:\p{Ll}*\p{Lu})+\p{Ll}*)\b
Replace:
NOTE: This uses unicode code points,
on recommendation. Also, I have specifically saved the current case value of the first letter of the word, rather than assuming all words are lowercase.
Other than that, the only real difference from Doitsu's regex is that I specifically looked for uppercase letters inside the match, rather than applying an equalizer on all words -- this has the same result, but ignores matches where we wouldn't end up changing anything.