Normal
0
21
false
false
false
DA
X-NONE
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabel - Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
I need a
RegEx that will find a specific word within a long string. The issue is that
this word may be misspelled and I need to find it even so. I would like to
accept a certain percentage of wrong-ness when looking for the word. Ex.
The
complete string: Hello, this is my comp/et sting to look at
The word to
search for: complete
Let’s say
that I which to accept a maximum of two wrong letters in the above string, then
the RegEx should match the word complete. However, if I only accept 1 wrong
letter it shouldn’t find it. Ideally the RegEx would also be able to handle
whitespaces, and missing letters. Ex:
The
complete string: Hello, this is my com pee sting to look at
The word to
search for: complete
This should
match the word as well, even though there is a whitespace between ‘m’ and ‘p’
and the letter ‘l’ is missing.
Is this possible
at all with RegEx or should I be looking at an alternative way to solve it?
Thanks, Tommy