Formatting Issues

How to Swap Numbers Separated by a Slash in Word

Algirdas JasaitisAlgirdas Jasaitis Oct 20, 2026 871 views

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.

How to Swap Numbers Separated by a Slash in Word
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Find and Replace

Press Ctrl + H on your keyboard to open the Replace dialog box, then click the 'More' button to display advanced search options.

2
Enable Wildcards

Check the box next to 'Use wildcards' to allow the use of advanced search patterns.

3
Input the Search Pattern

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.

4
Input the Replacement Pattern

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.

5
Apply the Replacement

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.

Use Wildcard Find and Replace
Adjusting Digit Length: If your numbers contain more than four digits, you can adjust the {1,4} part of the search pattern to match your specific needs, such as {1,6} for up to six digits.
Try WPS Writer for Advanced Formatting

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. 1. Open WPS Writer: Launch WPS Office and open your converted Word document in WPS Writer.
  2. 2. Access Find and Replace: Press Ctrl+H to open the Replace dialog box and click the 'Advanced' button.
  3. 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'.
Fully compatible with Microsoft Word document formats (.docx).Advanced Find and Replace tools with wildcard support to easily swap text strings.Built-in, high-quality PDF to Word converter.Free, lightweight, and user-friendly interface.
microsoft office alternative - wps office

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.