You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
Very close. "bys" is replaced by "byś" and a space at the beginning is removed. But the question is slightly different. The resulting word should be a valid word as per spell check! After running your macro "do bys" becomes dobyś or "test bys" becomes "testbyś" but it does not check hunspell affix or dict file. This is very important.shantanuo– shantanuo2024年04月24日 09:54:36 +00:00Commented Apr 24, 2024 at 9:54
-
With the way it's written now, I don't think it's possible to run the spell check on it as well because it does the search and replace in the entire document at once. The code will need to be rewritten to iterate over each replacement, and do spell check individually.H3coder– H3coder2024年04月25日 10:21:56 +00:00Commented Apr 25, 2024 at 10:21
-
Ok. I understand that. But I do not need to change "bys" to "byś". Just make sure that the first space before the word is removed and the second space next to word is kept. There are about 8 to 10 such words (for e.g. 'ed', 'ing', 'bys').shantanuo– shantanuo2024年04月28日 05:12:04 +00:00Commented Apr 28, 2024 at 5:12
-
This is working as expected. But can I use a single function instead of 2? gist.github.com/shantanuo/1ae004359c4aadfa67c514c0c9de9ba0shantanuo– shantanuo2024年04月28日 05:33:39 +00:00Commented Apr 28, 2024 at 5:33
-
For your case, it could be simplified to a single function. You'll have to put what you want to replace inside a list, then put the main portion inside a loop. Should be pretty simple.H3coder– H3coder2024年04月29日 06:54:04 +00:00Commented Apr 29, 2024 at 6:54