Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8270673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:39:08+00:00 2026-06-08T06:39:08+00:00

I have data that contains a note field that is full of invalid characters

  • 0

I have data that contains a note field that is full of invalid characters due to a faulty exporting tool and imported from an excel spreadsheet (*.xls).

The character is erroring out in XML, saying Character reference “&#xb” is an invalid XML character.

How would I go about replacing wingdings characters such as: Gender signs, blocks, symbols in PostgreSQL?

I tried in vain to copy and paste these characters into a replace statement, or anything for that matter, and it was futile. Is there a way through RegExp to replace any non-alphanumeric or “-=+” type of characters? Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:39:10+00:00Added an answer on June 8, 2026 at 6:39 am
    SELECT regexp_replace('123xabcABCxöäüxÖÄÜx¡‘’xæćčx=+-x"§$%&/()x'
                         ,'[^a-zA-Z0-9=+-]','_','g')
    

    Result:

    123xabcABCx___x___x___x___x=+-x________x
    

    The leading ^ in the character class [^a-zA-Z0-9=+-] negates it. Read “all characters not in the following list”.

    Take care to place the - character at the end (or beginning) of the character class, or it will have a special meaning like in a-z.

    Note the 4th parameter 'g' for “globally”. Without it, only the first match would be replaced.

    Note also, how characters like öäü get replaced as well. You may or may not want that …
    Therefore, you may be interested in the unaccent extension that provides the unaccent() function:

    The unaccent() function removes accents (diacritic signs) from a given
    string.

    Details about PostgreSQL regular expression in the manual here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data field that contains large numbers in two formats: 553000.468...705.46.0000000 <-
I have a object that contains data from a DB. The object has a
I have a field that contains data like below: 124.97#54.03#5#16 its number which separated
I have a database table that contains collection data for product collected from a
For an XML file I am creating I have data that contains a bullet
I have a data type that contains a set and a method that expects
I have a set of data that contains garbled text fields because of encoding
I have a database with a lot of old phpBB data that contains posts
I have a database with a lot of old phpBB data that contains posts
Ok, so I have an excel spreadsheet that contains data that I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.