regex - How to match foreign wods in BBEdit -
i've been researching way find , replace foreign words in bbedit i'm having issue it. after research ran across regex - regex matching foreign characters? led me regular-expressions.info , text block indicated:
matching single grapheme, whether it's encoded single code point, or multiple code points using combining marks, easy in perl, pcre, php, ruby 2.0, , great software applications: use \x.
and when have word (yes made testing) ōallaōallaēēalla
cannot use [a-za-z]*
entire word instead works in segments , solution i've been able come ([a-za-z]*\x{1,10})
. there alternative approach wouldn't greedy , pull entire word instead of pulling in segments?
you use word boundary \b
match between boundaries. might not everything, contrived example works.
/\b(.+)\b/
if want words @ beginning of line, need include those.
/(?:\b|^)(.+)\b/
try @ regex101.com. cannot test if works in bbedit though.
Comments
Post a Comment