1

my knowledge with Regex is limited and I'm trying to keep the text of the following sentence but remove the special characters such as dashes:

Λένα & Πλάτωνος - Red Axes Remixes
Sugai Ken 鯰上 - On The Quakefish

Anyone knows how to deal with different alphabets? I tried ([^\w'])+ but it removes the essential characters...

Thanks!

silveur
  • 157
  • 1
  • 9

1 Answers1

0

You could try something like this:

`[^\x00-\x1F\x21-\x7F]*

This should match anything not in the regular ascii set and space. You can update that to include whatever other regualar ascii characters you would like to include. As you can see, I have 1 ranges, so that it includes the 'space' character.

Obviously, you could go the other way around and do an inclusive match, making it easier to include the exact characters to match:

`[\x80-\x{FFFF} &]*

engineer14
  • 607
  • 4
  • 13