mapsedge: Me at Stone Bridge Coffee House (Titanic)
[personal profile] mapsedge
Is there a regular expression that would allow me to replace any character above ASCII-128 in a string with the HTML entity equiv, an in:

replace in {string}:  ascii-X with &#X; where X between 128 and 255

It would save a nested loop if I could figure out how to do it in one statement.

Date: 2008-08-14 16:32 (UTC)
From: [identity profile] rowangolightly.livejournal.com
Y'all are speakin' that foreign language again....

Date: 2008-08-15 16:55 (UTC)
From: [identity profile] billthetailor.livejournal.com
Well, as with any foreign language, it's best to start with a few basic phrases, such as:

010010000110010101101100011011000110111100101110

translation: Hello.

01010111011010000110010101110010011001010010000001101001011100110010000001110100011010000110010100100000011000100110000101110100011010000111001001101111011011110110110100111111

translation: Where is the bathroom?

0101011101101000011001010111001001100101001000000110100101110011001000000111010001101000011001010010000001101110011001010110000101110010011001010111001101110100001000000111001001100101011100110111010001100001011101010111001001100001011011100111010000111111

translation: where is the nearest restaurant?

I hope this handy guide will help you the next time you visit, and please enjoy your stay! :)

Date: 2008-08-15 19:50 (UTC)
From: [identity profile] rowangolightly.livejournal.com
::runs away to hide in my sewing room where it's safe::

June 2023

S M T W T F S
    123
45678910
11121314151617
1819 2021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 28th, 2026 18:58
Powered by Dreamwidth Studios