In texts that I receive from others, there are often hyphenated words that appeared at the end of a line in their word processor or text editor, but which aren't at the end of a line for my configuration. It's easy to change "-ing" to "ing" for instance, but when a word such as "grabbing" is present, the break is between the two consonants, so I wind up with "grab-bing." If I could search for a sequence where a hyphen/dash is inserted between two consonants and replace with those same two consonants, then my world would be ever so much brighter.
Is there a way to do that without setting up a macro that would search for 20+ possible combinations and correcting these hyphens that way?
Grizzly wrote:If I could search for a sequence where a hyphen/dash is inserted between two consonants and replace with those same two consonants, then my world would be ever so much brighter.
Select the "Regular expression" option in the Replace dialog.
Clear the "Match case" option (if you select it, this will only work for lower-case and not upper-case consonants).
Select the "Use POSIX regular expression syntax" option in the Preferences dialog.
Grizzly wrote:If I could search for a sequence where a hyphen/dash is inserted between two consonants and replace with those same two consonants, then my world would be ever so much brighter.
Select the "Regular expression" option in the Replace dialog.
Clear the "Match case" option (if you select it, this will only work for lower-case and not upper-case consonants).
Select the "Use POSIX regular expression syntax" option in the Preferences dialog.
Andrew
Thanks Andrew. I sincerely appreciate it, and I tried it out, but I need to match up only a "b" with a "b," a "c" with a "c", etc., etc. The expression above matched every possible instance of a hyphen between any two (random) consonants and deleted all the hyphens in the text file.
Thanks again for trying to help me out.
ak47wong did provide you with a solution that matched exactly what you requested:
If I could search for a sequence where a hyphen/dash is inserted between two consonants
.
But now you have changed the specs.
Here is a structure that you can complete:
Search for (b)-(b)|(c)-(c)|(d)-(d)|.......|(z)-(z)
Replace with \1\2
Continue after "d" with the consonants as shown in the original solution.
Use the following settings: -----------------------------------------
[X] Regular expression
Replace All -----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax -----------------------------------------
Last edited by Bob Hansen on Sun Jan 10, 2010 3:30 am, edited 1 time in total.
Bob Hansen wrote:ak47wong did provide you with a solution that matched exactly what you requested:
If I could search for a sequence where a hyphen/dash is inserted between two consonants
.
But now you have changed the specs.
Here is a structure that you can complete:
Search for (b)-(b)|(c)-(c)|(d)-(d)|.......|(z)-(z)
Replace with \1\2
Continue after "d" with the consonants as shown in the original solution.
I'm sorry for not accurately defining the problem. When I wrote, "If I could search for a sequence where a hyphen/dash is inserted between two consonants and replace with those same two consonants, then my world would be ever so much brighter." I thought I was being clear, but I guess not. Again, I apologize.