in reply to words wich ends with "f"
but if i want to know the words which ends with "f"Mach exactly what you want, not more. A . matches non-word characters, which is bad in your case. Try \b\w*f\b instead.
also i want to know the words wich does not begin with "f" but have at least one "f" in the remainder of the word:\b[^f]\w*f\w*\b might be worth a try, but I'm not convinced it's strict enough. Maybe \b(?=\w)[^f]\w*f\w*\b is right for you
(All examples here untested).
Update: ysth++ pointed out that (?=\w)[^f] is better written as [^f\W] - and indeed it is, if you consider only ASCII semantics. When you use Unicode, \w is not the same as [^\W].
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: words wich ends with "f"
by ikegami (Patriarch) on Jun 19, 2008 at 17:38 UTC | |
by moritz (Cardinal) on Jun 19, 2008 at 20:45 UTC | |
by ikegami (Patriarch) on Jun 19, 2008 at 21:46 UTC |