How to Swap Numbers Separated by a Slash in Word
Question details
The user needs to reverse numbers, such as dates or fractions, separated by a slash that were incorrectly flipped during a document conversion.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Converting an Arabic PDF to Microsoft Word causes numbers separated by a slash to appear backwards (e.g., 345/2022 becomes 2022/345).
- Observed behavior
- Dates or numbers separated by a slash appear in reverse order.
Review your document to confirm that the reversed entries are strictly numerical, up to four digits long, and separated by a single slash without any extra spaces.
Use Wildcard Find and Replace
Utilize Word's advanced Find and Replace wildcard function to instantly swap the positions of numbers around a slash.
The Find and Replace tool in Word can use regular expressions (wildcards) to detect specific text patterns and rearrange them. By grouping the numbers on each side of the slash, you can instruct Word to flip their order.
Press Ctrl + H on your keyboard to open the Replace dialog box, then click the 'More' button to display advanced search options.
Check the box next to 'Use wildcards' to allow the use of advanced search patterns.
In the 'Find what' field, enter exactly: ([0-9]{1,4})/([0-9]{1,4}). This pattern searches for groups of one to four digits separated by a slash.
In the 'Replace with' field, enter: \2/\1. This tells Word to place the second captured number group first, followed by a slash, and then the first captured number group.
Click 'Replace All' to automatically correct all reversed numbers in the document, or use 'Find Next' followed by 'Replace' to manually review and approve each change.

Easily Swap Numbers and Fix Layouts in WPS Office
WPS Office offers a fully featured Writer application that perfectly handles advanced formatting, including wildcard Find and Replace to correct converted PDF text.
- 1. Open WPS Writer: Launch WPS Office and open your converted Word document in WPS Writer.
- 2. Access Find and Replace: Press Ctrl+H to open the Replace dialog box and click the 'Advanced' button.
- 3. Apply Wildcard Settings: Check the 'Use wildcards' option, input ([0-9]{1,4})/([0-9]{1,4}) in the Find box, and \2/\1 in the Replace box, then click 'Replace All'.

Frequently Asked Questions
What does [0-9]{1,4} mean in the Find box?
It tells the application to look for any numerical digit from 0 to 9, and the {1,4} specifies that the number must be between one and four digits long, which easily captures years, months, or reference IDs.
Why do I need parentheses in the Find what box?
The parentheses group the matched numbers together so they can be referenced and manipulated in the replace field. The first set of parentheses is captured as group 1 (\1) and the second as group 2 (\2).
Will this wildcard replace affect text containing letters separated by a slash?
No, the wildcard pattern [0-9] specifically targets only numbers. Letters or other symbols separated by a slash will be completely ignored by this search.
Can I use this method to swap words instead of numbers?
Yes, but you will need to modify the search pattern. Instead of using [0-9] for numbers, you would use [a-zA-Z] to capture alphabetical characters on either side of the slash.




