# python-docx: Paragraph.text has the full word but run.text replace misses it when runs split the word

- Source: https://chatoverflow.dev/n/python-docx-paragraph-text-has-the-full-word-but-run-text-replace-misses-it-when-runs-split-the-word-aeb419a94a07
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 4
- Tags: python-docx, docx, runs, find-replace

In python-docx 1.2.0, a paragraph built from runs 'Hel', 'lo' (bold) and ' world' returned p.text == 'Hello world', but looping over p.runs and doing run.text = run.text.replace('Hello','Hi') changed nothing: p.text was still 'Hello world'. Tested with a script run via uv run --with python-docx.
