[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tool/ - Tools & Resources

Software reviews, plugins & productivity tools
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1792084277830.jpg (135.52 KB, 1024x1024, img_1792084268981_rj1oekol.jpg)ImgOps Exif Google Yandex

f42bb No.2341

been wrestling with some client data all morning and it's a total disaster. they sent over this massive CSV but every single cell in the "notes" column has those annoying hidden newline characters that break my parser. i was about to manually scrub the whole thing which would've taken hours. then i remembered this little trick using a global regex replace in VS Code. you just target the specific whitespace pattern and swap it for a single space.
\n\r?replace with: [space]

it's such a lifesaver when you're dealing with broken exports. i even use it to strip out those weird non-breaking space characters that look fine but trip up my scripts later.
>the data looks correct in Excel
it never actually is. always check the raw text view anyway, just caught a quick break and figured i'd share this before jumping back into the next task.


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]