|
List Info
Thread: Regex for possible misspellings in a word
|
|
| Regex for possible misspellings in a
word |
  United States |
2007-10-10 21:04:27 |
Hi,
I wondered if theres a way to make this regex more compact
or better.
I want to check for possible misspellings in a word. For
example to
match misspellings for "knot" were one character
is wrong. So:
((k|w)not)|(k(n|w)ot)|(kn(o|w)t)|(kno(t|w))
Is there a better way?
Thanks,
Lee G.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Regex for possible misspellings in a
word |

|
2007-10-10 21:09:02 |
|
|
| Re: Regex for possible misspellings in a
word |
  United States |
2007-10-10 22:48:50 |
> > ((k|w)not)|(k(n|w)ot)|(kn(o|w)t)|(kno(t|w))
>
> does this regex equal to
(wnot)|(kwot)|(knwt)|(know) ??
>
Yes. Thank you.
I wonder if there's a way to make it even shorter?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Regex for possible misspellings in a
word |

|
2007-10-10 23:23:01 |
|
regular expression is context-free grammar,
so I think it's not the best way to solve your problem
On 10/11/07, leegold58 < goldtech worldpost.com">goldtech worldpost.com> wrote:
> > ((k|w)not)|(k(n|w)ot)|(kn(o|w)t)|(kno(t|w)) > > does this regex equal to (wnot)|(kwot)|(knwt)|(know) ??
>
Yes. Thank you.
I wonder if there's a way to make it even shorter?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Regex" group. To post to this group, send email to regex googlegroups.com To unsubscribe from this group, send email to regex-unsubscribe googlegroups.com For more options, visit this group at http://groups.google.com/group/regex -~----------~----~----~----~------~----~------~--~---
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|