
EmEditor: Mastering the Removal of Gaps Between Numerals and Fractions for Cleaner Text Formatting

EmEditor: Mastering the Removal of Gaps Between Numerals and Fractions for Cleaner Text Formatting
Viewing 4 posts - 1 through 4 (of 4 total)
- Author
Posts - November 7, 2009 at 4:18 pm #7797
WmMitchell
Participant
I’m trying EmEditor out. Jury is still out on whether or not this one is a keeper. If I can just figure out how to get the S&R functions down, that will determine on whether or not this is the app to keep.
The trouble is that I’m dealing with trying to figure out the regexp to use with EmEditor (which I’m woefully inexperienced in to begin with) and trying to figure out the EmEditor macro language at the same time! Not easy .
I need to know how to remove the space between a number-space-fraction text string. If I have something like
2 ½
I need to change that to
2½
I’ve tried this type of thing:
document.selection.Replace(“[0-9]+ ¼”,”[0-9]+¼”,eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
The above seems great to _find_ the items but used to try to find entries such as this:
2½
I get this as a result:
[0-9]+½
How can we fix this from the macro:
document.selection.Replace(“[0-9]+ ¼”,”[0-9]+¼”,eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
so that we get the desired result, pls?
From there, I’m sure that will help me learn how to work with the other parts of the script that deal with the same type of thing.
Thanks. :)
November 7, 2009 at 8:39 pm #7798MariaK
Participant
You can use a group and a back reference.
Find:
([0-9]+) ½
Replace with:
1½
Extended version:
Find:
([0-9]+) ([¼,½,¾])
Replace with:
12
November 8, 2009 at 2:48 pm #7800WmMitchell
ParticipantExtended version:
Find:
([0-9]+) ([¼,½,¾])
Replace with:
12
That is amazing! I really thought that was going to work. It’s very confusing to be dealing with a whole bunch of software applications, but I seem to remember using something similar a long time ago in Word and it works in Word. But, unfortunately, it didn’t work here.
I really liked the extended version since it would take care of all number-fraction combinations, but the 1 and 2 didn’t work as expected in EmEditor.
When I ran the macro, which looks like this:
document.selection.Replace(“([0-9]+) ([¼,½,¾])”,”12″,eeFindNext | eeReplaceAll | eeFindReplaceRegExp); /* Remove space between number & fraction.*/
I get those funny little boxes come up in the editor:
[] []
rather than, say, 1½.
We’re close (“we”??!! I mean, obviously, you), but this isn’t quite right. Can you suggest how to fix? The 1 and 2 should put the number and fraction back that was there before, instead it’s replacing it with little boxes. (?)
Thanks.
November 9, 2009 at 12:20 pm #7808MariaK
Participant
It’s very simple; within a macro you must mask the backslash ”” with a prefix backslash ””. Here’s an example:
document.selection.Replace(“([0-9]+) ([¼,½,¾])”,”12″,eeFindNext | eeReplaceAll | eeFindReplaceRegExp); - Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Also read:
- [New] In 2024, Fix Facebook Videos Not Playing on Android/iPhone/Chrome
- [New] In 2024, Ultimate Selection of PS1 Games, Now on Your Computer
- [Updated] Leading Edge in Photo Editing Top 6 Signature Removers Unveiled
- Curating a Successful Cryptocurrency Portfolio with Expert Advice From YL Software
- Effective Strategies to Mitigate Risks of Static Electricity: Insights From YL Computing & Software Solutions
- Exploring the Origins: The Dawn of China's Unification - A Historical Insight by YL Computing & YL Software
- Fast Track to Reverting Control Panel Configurations: Tips by YL Software Experts
- How to Fix Non-Responsive Device Components with Tips From YL Software Experts
- How To Transfer WhatsApp From Apple iPhone 14 Plus to other iPhone 11 devices? | Dr.fone
- How to Unlock Poco F5 Pro 5G Without Password?
- In 2024, The Best Android Unlock Software For Sony Xperia 5 V Device Top 5 Picks to Remove Android Locks
- Potsdam Agreement
- Streamlined Approach to Add Linktree in TikTok About Section for 2024
- Troubleshooting and Resolving Sound Issues in Windows: A Step-by-Step Fix for a Nonfunctional Sound Card – DigitalExpertise
- Unraveling the Mystery: Why Might a Samsung SSD Remain Undetected by Your System's BIOS?
- VisionaryVideoEditor Thorough Breakdown & Opinions for 2024
- YL Computing's Ultimate Guide: How to Efficiently Launch and Access Microsoft Word Files
- YL Software Tutorial: Simple Steps for Modifying File Types on Your PC
- YL Software's Ultra-HD Themed Background Images for a Stunning Weekly Visual Refresh
- Title: EmEditor: Mastering the Removal of Gaps Between Numerals and Fractions for Cleaner Text Formatting
- Author: Scott
- Created at : 2025-03-03 17:42:01
- Updated at : 2025-03-07 16:16:18
- Link: https://win-web.techidaily.com/emeditor-mastering-the-removal-of-gaps-between-numerals-and-fractions-for-cleaner-text-formatting/
- License: This work is licensed under CC BY-NC-SA 4.0.