InDesign uses Perl-compatible regular expressions (pcre). Getting a Unicode character into the replacement string is done by \x{XXXX} where XXXX is the hexadecimal character code:

2\x{2009}$5

But in general you can replace by any character you can type. Just put actual thin spaces into your search-and-replace dialog:

3 $5

You can use your OS's utilities to grab the thin space from the list of available characters, for Windows it's the "Character Map" tool, where the thin space can be found in the "General Punctuation" Unicode sub-range. Searching for "thin space" works as well. MacOS has the "Character Viewer", which can do the same thing.

Answer from Tomalak on Stack Overflow
Top answer
1 of 5
12

Adapted from Semplice, following link from here.

[^\x00-\x80] matches any character not in the ASCII range.
Note that some of the characters may not be encoded correctly from the copy and paste.

var latin_map = {"Á":"A","Ă":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Ǟ":"A","Ȧ":"A","Ǡ":"A","Ạ":"A","Ȁ":"A","À":"A","Ả":"A","Ȃ":"A","Ā":"A","Ą":"A","Å":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ć":"C","Č":"C","Ç":"C","Ḉ":"C","Ĉ":"C","Ċ":"C","Ƈ":"C","Ȼ":"C","Ď":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","Ɗ":"D","Ḏ":"D","Dz":"D","Dž":"D","Đ":"D","Ƌ":"D","DZ":"DZ","DŽ":"DZ","É":"E","Ĕ":"E","Ě":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ė":"E","Ẹ":"E","Ȅ":"E","È":"E","Ẻ":"E","Ȇ":"E","Ē":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Ƒ":"F","Ǵ":"G","Ğ":"G","Ǧ":"G","Ģ":"G","Ĝ":"G","Ġ":"G","Ɠ":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Ȟ":"H","Ḩ":"H","Ĥ":"H","Ⱨ":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","Î":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ":"I","Ì":"I","Ỉ":"I","Ȋ":"I","Ī":"I","Į":"I","Ɨ":"I","Ĩ":"I","Ḭ":"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","Ꞃ":"R","Ꞅ":"S","Ꞇ":"T","Ꝭ":"IS","Ĵ":"J","Ɉ":"J","Ḱ":"K","Ǩ":"K","Ķ":"K","Ⱪ":"K","Ꝃ":"K","Ḳ":"K","Ƙ":"K","Ḵ":"K","Ꝁ":"K","Ꝅ":"K","Ĺ":"L","Ƚ":"L","Ľ":"L","Ļ":"L","Ḽ":"L","Ḷ":"L","Ḹ":"L","Ⱡ":"L","Ꝉ":"L","Ḻ":"L","Ŀ":"L","Ɫ":"L","Lj":"L","Ł":"L","LJ":"LJ","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ń":"N","Ň":"N","Ņ":"N","Ṋ":"N","Ṅ":"N","Ṇ":"N","Ǹ":"N","Ɲ":"N","Ṉ":"N","Ƞ":"N","Nj":"N","Ñ":"N","NJ":"NJ","Ó":"O","Ŏ":"O","Ǒ":"O","Ô":"O","Ố":"O","Ộ":"O","Ồ":"O","Ổ":"O","Ỗ":"O","Ö":"O","Ȫ":"O","Ȯ":"O","Ȱ":"O","Ọ":"O","Ő":"O","Ȍ":"O","Ò":"O","Ỏ":"O","Ơ":"O","Ớ":"O","Ợ":"O","Ờ":"O","Ở":"O","Ỡ":"O","Ȏ":"O","Ꝋ":"O","Ꝍ":"O","Ō":"O","Ṓ":"O","Ṑ":"O","Ɵ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Õ":"O","Ṍ":"O","Ṏ":"O","Ȭ":"O","Ƣ":"OI","Ꝏ":"OO","Ɛ":"E","Ɔ":"O","Ȣ":"OU","Ṕ":"P","Ṗ":"P","Ꝓ":"P","Ƥ":"P","Ꝕ":"P","Ᵽ":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q","Ŕ":"R","Ř":"R","Ŗ":"R","Ṙ":"R","Ṛ":"R","Ṝ":"R","Ȑ":"R","Ȓ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꜿ":"C","Ǝ":"E","Ś":"S","Ṥ":"S","Š":"S","Ṧ":"S","Ş":"S","Ŝ":"S","Ș":"S","Ṡ":"S","Ṣ":"S","Ṩ":"S","Ť":"T","Ţ":"T","Ṱ":"T","Ț":"T","Ⱦ":"T","Ṫ":"T","Ṭ":"T","Ƭ":"T","Ṯ":"T","Ʈ":"T","Ŧ":"T","Ɐ":"A","Ꞁ":"L","Ɯ":"M","Ʌ":"V","Ꜩ":"TZ","Ú":"U","Ŭ":"U","Ǔ":"U","Û":"U","Ṷ":"U","Ü":"U","Ǘ":"U","Ǚ":"U","Ǜ":"U","Ǖ":"U","Ṳ":"U","Ụ":"U","Ű":"U","Ȕ":"U","Ù":"U","Ủ":"U","Ư":"U","Ứ":"U","Ự":"U","Ừ":"U","Ử":"U","Ữ":"U","Ȗ":"U","Ū":"U","Ṻ":"U","Ų":"U","Ů":"U","Ũ":"U","Ṹ":"U","Ṵ":"U","Ꝟ":"V","Ṿ":"V","Ʋ":"V","Ṽ":"V","Ꝡ":"VY","Ẃ":"W","Ŵ":"W","Ẅ":"W","Ẇ":"W","Ẉ":"W","Ẁ":"W","Ⱳ":"W","Ẍ":"X","Ẋ":"X","Ý":"Y","Ŷ":"Y","Ÿ":"Y","Ẏ":"Y","Ỵ":"Y","Ỳ":"Y","Ƴ":"Y","Ỷ":"Y","Ỿ":"Y","Ȳ":"Y","Ɏ":"Y","Ỹ":"Y","Ź":"Z","Ž":"Z","Ẑ":"Z","Ⱬ":"Z","Ż":"Z","Ẓ":"Z","Ȥ":"Z","Ẕ":"Z","Ƶ":"Z","IJ":"IJ","Œ":"OE","ᴀ":"A","ᴁ":"AE","ʙ":"B","ᴃ":"B","ᴄ":"C","ᴅ":"D","ᴇ":"E","ꜰ":"F","ɢ":"G","ʛ":"G","ʜ":"H","ɪ":"I","ʁ":"R","ᴊ":"J","ᴋ":"K","ʟ":"L","ᴌ":"L","ᴍ":"M","ɴ":"N","ᴏ":"O","ɶ":"OE","ᴐ":"O","ᴕ":"OU","ᴘ":"P","ʀ":"R","ᴎ":"N","ᴙ":"R","ꜱ":"S","ᴛ":"T","ⱻ":"E","ᴚ":"R","ᴜ":"U","ᴠ":"V","ᴡ":"W","ʏ":"Y","ᴢ":"Z","á":"a","ă":"a","ắ":"a","ặ":"a","ằ":"a","ẳ":"a","ẵ":"a","ǎ":"a","â":"a","ấ":"a","ậ":"a","ầ":"a","ẩ":"a","ẫ":"a","ä":"a","ǟ":"a","ȧ":"a","ǡ":"a","ạ":"a","ȁ":"a","à":"a","ả":"a","ȃ":"a","ā":"a","ą":"a","ᶏ":"a","ẚ":"a","å":"a","ǻ":"a","ḁ":"a","ⱥ":"a","ã":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ḃ":"b","ḅ":"b","ɓ":"b","ḇ":"b","ᵬ":"b","ᶀ":"b","ƀ":"b","ƃ":"b","ɵ":"o","ć":"c","č":"c","ç":"c","ḉ":"c","ĉ":"c","ɕ":"c","ċ":"c","ƈ":"c","ȼ":"c","ď":"d","ḑ":"d","ḓ":"d","ȡ":"d","ḋ":"d","ḍ":"d","ɗ":"d","ᶑ":"d","ḏ":"d","ᵭ":"d","ᶁ":"d","đ":"d","ɖ":"d","ƌ":"d","ı":"i","ȷ":"j","ɟ":"j","ʄ":"j","dz":"dz","dž":"dz","é":"e","ĕ":"e","ě":"e","ȩ":"e","ḝ":"e","ê":"e","ế":"e","ệ":"e","ề":"e","ể":"e","ễ":"e","ḙ":"e","ë":"e","ė":"e","ẹ":"e","ȅ":"e","è":"e","ẻ":"e","ȇ":"e","ē":"e","ḗ":"e","ḕ":"e","ⱸ":"e","ę":"e","ᶒ":"e","ɇ":"e","ẽ":"e","ḛ":"e","ꝫ":"et","ḟ":"f","ƒ":"f","ᵮ":"f","ᶂ":"f","ǵ":"g","ğ":"g","ǧ":"g","ģ":"g","ĝ":"g","ġ":"g","ɠ":"g","ḡ":"g","ᶃ":"g","ǥ":"g","ḫ":"h","ȟ":"h","ḩ":"h","ĥ":"h","ⱨ":"h","ḧ":"h","ḣ":"h","ḥ":"h","ɦ":"h","ẖ":"h","ħ":"h","ƕ":"hv","í":"i","ĭ":"i","ǐ":"i","î":"i","ï":"i","ḯ":"i","ị":"i","ȉ":"i","ì":"i","ỉ":"i","ȋ":"i","ī":"i","į":"i","ᶖ":"i","ɨ":"i","ĩ":"i","ḭ":"i","ꝺ":"d","ꝼ":"f","ᵹ":"g","ꞃ":"r","ꞅ":"s","ꞇ":"t","ꝭ":"is","ǰ":"j","ĵ":"j","ʝ":"j","ɉ":"j","ḱ":"k","ǩ":"k","ķ":"k","ⱪ":"k","ꝃ":"k","ḳ":"k","ƙ":"k","ḵ":"k","ᶄ":"k","ꝁ":"k","ꝅ":"k","ĺ":"l","ƚ":"l","ɬ":"l","ľ":"l","ļ":"l","ḽ":"l","ȴ":"l","ḷ":"l","ḹ":"l","ⱡ":"l","ꝉ":"l","ḻ":"l","ŀ":"l","ɫ":"l","ᶅ":"l","ɭ":"l","ł":"l","lj":"lj","ſ":"s","ẜ":"s","ẛ":"s","ẝ":"s","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ᵯ":"m","ᶆ":"m","ń":"n","ň":"n","ņ":"n","ṋ":"n","ȵ":"n","ṅ":"n","ṇ":"n","ǹ":"n","ɲ":"n","ṉ":"n","ƞ":"n","ᵰ":"n","ᶇ":"n","ɳ":"n","ñ":"n","nj":"nj","ó":"o","ŏ":"o","ǒ":"o","ô":"o","ố":"o","ộ":"o","ồ":"o","ổ":"o","ỗ":"o","ö":"o","ȫ":"o","ȯ":"o","ȱ":"o","ọ":"o","ő":"o","ȍ":"o","ò":"o","ỏ":"o","ơ":"o","ớ":"o","ợ":"o","ờ":"o","ở":"o","ỡ":"o","ȏ":"o","ꝋ":"o","ꝍ":"o","ⱺ":"o","ō":"o","ṓ":"o","ṑ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","õ":"o","ṍ":"o","ṏ":"o","ȭ":"o","ƣ":"oi","ꝏ":"oo","ɛ":"e","ᶓ":"e","ɔ":"o","ᶗ":"o","ȣ":"ou","ṕ":"p","ṗ":"p","ꝓ":"p","ƥ":"p","ᵱ":"p","ᶈ":"p","ꝕ":"p","ᵽ":"p","ꝑ":"p","ꝙ":"q","ʠ":"q","ɋ":"q","ꝗ":"q","ŕ":"r","ř":"r","ŗ":"r","ṙ":"r","ṛ":"r","ṝ":"r","ȑ":"r","ɾ":"r","ᵳ":"r","ȓ":"r","ṟ":"r","ɼ":"r","ᵲ":"r","ᶉ":"r","ɍ":"r","ɽ":"r","ↄ":"c","ꜿ":"c","ɘ":"e","ɿ":"r","ś":"s","ṥ":"s","š":"s","ṧ":"s","ş":"s","ŝ":"s","ș":"s","ṡ":"s","ṣ":"s","ṩ":"s","ʂ":"s","ᵴ":"s","ᶊ":"s","ȿ":"s","ɡ":"g","ᴑ":"o","ᴓ":"o","ᴝ":"u","ť":"t","ţ":"t","ṱ":"t","ț":"t","ȶ":"t","ẗ":"t","ⱦ":"t","ṫ":"t","ṭ":"t","ƭ":"t","ṯ":"t","ᵵ":"t","ƫ":"t","ʈ":"t","ŧ":"t","ᵺ":"th","ɐ":"a","ᴂ":"ae","ǝ":"e","ᵷ":"g","ɥ":"h","ʮ":"h","ʯ":"h","ᴉ":"i","ʞ":"k","ꞁ":"l","ɯ":"m","ɰ":"m","ᴔ":"oe","ɹ":"r","ɻ":"r","ɺ":"r","ⱹ":"r","ʇ":"t","ʌ":"v","ʍ":"w","ʎ":"y","ꜩ":"tz","ú":"u","ŭ":"u","ǔ":"u","û":"u","ṷ":"u","ü":"u","ǘ":"u","ǚ":"u","ǜ":"u","ǖ":"u","ṳ":"u","ụ":"u","ű":"u","ȕ":"u","ù":"u","ủ":"u","ư":"u","ứ":"u","ự":"u","ừ":"u","ử":"u","ữ":"u","ȗ":"u","ū":"u","ṻ":"u","ų":"u","ᶙ":"u","ů":"u","ũ":"u","ṹ":"u","ṵ":"u","ᵫ":"ue","ꝸ":"um","ⱴ":"v","ꝟ":"v","ṿ":"v","ʋ":"v","ᶌ":"v","ⱱ":"v","ṽ":"v","ꝡ":"vy","ẃ":"w","ŵ":"w","ẅ":"w","ẇ":"w","ẉ":"w","ẁ":"w","ⱳ":"w","ẘ":"w","ẍ":"x","ẋ":"x","ᶍ":"x","ý":"y","ŷ":"y","ÿ":"y","ẏ":"y","ỵ":"y","ỳ":"y","ƴ":"y","ỷ":"y","ỿ":"y","ȳ":"y","ẙ":"y","ɏ":"y","ỹ":"y","ź":"z","ž":"z","ẑ":"z","ʑ":"z","ⱬ":"z","ż":"z","ẓ":"z","ȥ":"z","ẕ":"z","ᵶ":"z","ᶎ":"z","ʐ":"z","ƶ":"z","ɀ":"z","ff":"ff","ffi":"ffi","ffl":"ffl","fi":"fi","fl":"fl","ij":"ij","œ":"oe","st":"st","ₐ":"a","ₑ":"e","ᵢ":"i","ⱼ":"j","ₒ":"o","ᵣ":"r","ᵤ":"u","ᵥ":"v","ₓ":"x"};

function embolden( str, chr ){
    return str.replace( /[^\x00-\x80]/g,
        function (a) { 
            return chr == latin_map[a] ? '<b>' + a + '</b>' : a;
        } 
    );
}

embolden( 'ádám', 'a' );    // "<b>á</b>d<b>á</b>m"
2 of 5
3

I've tried this code, see if it's what you're looking for:

'ádám'.replace(/./g,function(char){
    switch(char.toLowerCase()){
        case 'á':
        case 'à':
        case 'â':
        case 'ã':
            return '*';
        break;
    }
    return char;
});

EDIT:

To replace all chars that don't belong to the ASCII table, just check if the char has a char code up to 127, since the ASCII table char codes are defined between 0 and 127 (notice that á doesn't belong to the Unicode table, but to the Extended ASCII table, that comes from 0 up to 255):

'ádám'.replace(/./g,function(char){
    return char.charCodeAt(0)<=127 ? char : '<b>' + char + '</b>';
});
Discussions

find and replace unicode by regex
At first pass the thing that comes to mind is to use a hashtable. This might be a little messy but it avoids code repeat if you need to add or remove any key/values. I'm sure someone can come up with a slick method. $Path = 'C:\Temp\Content.txt' $DestFile = 'C:\Temp\DestFile.txt' $HashTable = @{ '¨' = '1' '©' = '2' 'ª' = '3' '«' = '4' '¬' = '5' '°' = '6' } [regex]$Regex = $HashTable.Keys -join '|' $Result = switch -Regex -File $Path { $Regex { $_ -replace $Matches.0, $HashTable[$Matches.0] } default { $_ } } $Result | Out-File $DestFile More on reddit.com
🌐 r/PowerShell
5
4
July 8, 2019
c# - Replace Unicode character "�" with a space - Stack Overflow
I'm a doing an massive uploading of information from a .csv file and I need replace this character non ASCII "�" for a normal space, " ". The character "�" corresp... More on stackoverflow.com
🌐 stackoverflow.com
Regex fails if the source string contains the Unicode replacement character
This regex: Var instr, outstr As ... for me unless the input string (instr) contains the Unicode replacement character (U+FFFD �, UTF-8: ef bf bd). In the case where instr does contain this character, then the regex does ...... More on forum.xojo.com
🌐 forum.xojo.com
0
0
November 2, 2023
[Word] Insert Unicode character in RegExp.replace string
Apparently, I'm a dumdum. For Unicode characters I need to use the ChrW() function to insert them. More on reddit.com
🌐 r/vba
2
2
March 26, 2022
🌐
Python documentation
docs.python.org › 3 › library › re.html
re — Regular expression operations — Python 3.14.6 ...
May 25, 2026 - The regex matching flags. This is a combination of the flags given to compile(), any (?...) inline flags in the pattern, and implicit flags such as UNICODE if the pattern is a Unicode string.
🌐
Reddit
reddit.com › r/powershell › find and replace unicode by regex
r/PowerShell on Reddit: find and replace unicode by regex
July 8, 2019 -

i have several strings of characters that have unicode at the end of them. I would like to do a find with regex and replace the unicode with the specified characters.

30May19Bel©
13Jun18Bel¬
24Aug17Sar«

I would like to do a find and replace with regex

for example [0-9]{2}[a-zA-Z]{3}[0-9]{2}[a-zA-Z]{3}©

$path = 'C:temp\uni.txt'
$original_file = C:temp\uni.txt"
$destination_file = "C:temp\update.txt"
(Get-Content $original_file) | Foreach-Object {
    $_ -replace '¨', '1'`
     -replace '©', '2'`
     -replace 'ª', '3'`
     -replace '«', '4'`
     -replace '¬', '5'`
     -replace '°', '6'`
     
    } | Set-Content $destination_file

and replace it with

30May19Bel2
13Jun18Bel5
24Aug17Sar4

This may be a caveman approach, and I know nothing about regex. If there is a better way, i am unaware of it, but totally open to someone dropping the egg of knowledge on me. It just seemed like the easiest way was to create a Rosetta Stone of sorts. Thanks, Rogue

🌐
Xojo Programming Forum
forum.xojo.com › general
Regex fails if the source string contains the Unicode replacement character - General - Xojo Programming Forum
November 2, 2023 - This regex: Var instr, outstr As String ro = new RegExOptions ro.CaseSensitive = False ro.ReplaceAllMatches = True re = new RegEx re.Options = ro re.SearchPattern = "\s\s+" re.ReplacementPattern = " " outst…
🌐
Unicode
unicode.org › reports › tr18
UTS #18: Unicode Regular Expressions
However, the names used by the implementation for these properties may differ from the formal Unicode names for the properties. For example, if a regex engine already has a property called "Alphabetic", for backwards compatibility it may need to use a distinct name, such as "Unicode_Alphabetic", for the corresponding property listed in RL1.2.
🌐
LearnByExample
learnbyexample.github.io › learn_js_regexp › unicode.html
Unicode - Understanding JavaScript RegExp
// extract all consecutive letters // \p{L} is an alias for \p{Letter} > 'fox:αλεπού,eagle:αετός'.match(/\p{L}+/gu) < ['fox', 'αλεπού', 'eagle', 'αετός'] // extract all consecutive Greek letters // \p{sc} is an alias for \p{Script} > 'fox:αλεπού,eagle:αετός'.match(/\p{sc=Greek}+/gu) < ['αλεπού', 'αετός'] // delete all characters other than letters > 'φοο12,βτ_4,fig'.replace(/\P{L}+/gu, '') < 'φοοβτfig' // extract whole words not surrounded by punctuation marks > 'tie. ink east;'.match(/(?&LT!\p{P})\b\w+\b(?!\p{P})/gu) < ['ink'] See MDN: Unicode character class escape for more details.
Find elsewhere
🌐
Reddit
reddit.com › r/vba › [word] insert unicode character in regexp.replace string
r/vba on Reddit: [Word] Insert Unicode character in RegExp.replace string
March 26, 2022 -

So my regex pretty much matches what it needs to (I hope), but now I'd like to make replacements that insert certain special characters. As an example, I'd like to insert a narrow non-breaking space (\u202F) between a number and its unit. The number and the unit are already being captured in their respective capture group, so now I only need to create the correct replacement string.

I kinda expected "$1\u202F$2" to work, but unfortunately that just prints out silliness like 200\u202Fm.

I also tried "$1" & Chr(8239) & "$2", which compiled, but did literally nothing.

🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › RegExp › unicode
RegExp.prototype.unicode - JavaScript - MDN Web Docs
When we refer to Unicode-aware mode, we mean the regex has either the u or the v flag, in which case the regex enables Unicode-related features (such as Unicode character class escape) and has much stricter syntax rules.
🌐
Regular-Expressions.info
regular-expressions.info › unicode.html
Regex Tutorial: Introduction to Unicode Regular Expressions
Unfortunately, Unicode brings its own requirements and pitfalls when it comes to regular expressions. Unicode continues to evolve, typically releasing a new version each September. When a regex engine is updated to a newer version of Unicode it can change how your regexes work.
🌐
AutoHotkey
autohotkey.com › board › topic › 97682-how-can-i-specify-unicode-characters-in-regexreplace-replacement-parameter
How can I specify unicode characters in RegExReplace replacement parameter? - Ask for Help - AutoHotkey Community
September 18, 2025 - First of all, to ensure that you are not missing an update that is contributing to your problem, I would strongly suggest that you upgrade to the latest version of AHK. Also, if you are using a Unicode version of AHK make sure that your script is saved as UTF-8 and not ANSI. That aside, regex applies to the needle parameter only; it is not used in the replacement parameter.
🌐
Stack Overflow
stackoverflow.com › questions › 39849114 › regex-js-replace-character-by-unicode
regex js: Replace character by unicode - javascript
October 4, 2016 - within the regular expression defines a character set to match spaces and includes the narrow non breaking space character itself. This could be extended to include specific additional space characters such as non breaking space (\u00A0), tabs, or replaced with \s to match any white space characters including line feeds.
🌐
AutoHotkey
autohotkey.com › boards › viewtopic.php
How do I specify a Unicode string to RegExReplace? - AutoHotkey Community
November 25, 2016 - This is a routine to remove any/all Hebrew pointing from the selected text. !.:: send ^c NoHebrewPoints() send ^v return NoHebrewPoints() { static tRepl1 := "[\x{05B0}-\x{05CF}]" static tRepl2 := "[\x{0590}-\x{05AF}]" Clipboard := RegExReplace(Clipboard,tRepl1,"") Clipboard := RegExReplace(Clipboard,tRepl2,"") }
🌐
Python.org
discuss.python.org › python help
Regex for unicode letter - Python Help - Discussions on Python.org
February 24, 2021 - I want to create a regex to match a Unicode letter followed by any number of letters, digits, spaces, hyphens, or underscores. If the first bit was just an ASCII letter then it is easy: [A-Za-z][-\w ]* But what do I re…
🌐
B4X
b4x.com › home › forums › b4a - android › android questions
Regex Replace with Unicode Support ? | B4X Programming Forum
March 5, 2023 - Sub RemoveNumbersAndBrackets(inputString As String) As String Dim outputString As String Dim lines() As String lines = Regex.Split("\n", inputString) ' Split inputString into an array of lines using regex For Each line As String In lines line = Regex.Replace("[\p{N}()\\\[\]]+", "", line) ' Remove numbers and brackets from the line line = Regex.Replace("^[\.]+", "", line) ' Remove full stop from beginning of line (left when numbers are removed) line = line.Trim If line <> "" Then ' Check if the line is not blank outputString = outputString & line & CRLF ' Append modified line to outputString End If Next Return outputString.Trim End Sub
🌐
Stack Exchange
vi.stackexchange.com › questions › 26739 › use-unicode-string-to-replace-cjk-characters
Use unicode string to replace cjk characters - Vi and Vim Stack Exchange
August 5, 2020 - It can replace 你 with you,it turn out to be i and you,i change i and 你 into i and you,now i want to change reversely,change i and you into i and 你,it can be done with %s/you/你/g,try another way: ... That is because \%u4f60 is a regex atom, that is only valid in the search part of the :s.