regex emphasis character matching ?

Atari talk, or the life and the universe and things. Just keep it clean!
Post Reply
User avatar
exxos
Site Admin
Site Admin
Posts: 7649
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

regex emphasis character matching ?

Post by exxos » Sun Sep 08, 2019 9:59 am

I have this to allow only the stated chars into a input box

Code: Select all

[^ a-z0-9A-Z'-_,]
But how do I add in those letters with the emphasis above them as well ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

User avatar
IngoQ
Site Admin
Site Admin
Posts: 818
Joined: Tue Aug 22, 2017 8:38 am
Location: Germany

Re: regex emphasis character matching ?

Post by IngoQ » Sat Sep 14, 2019 1:05 pm

If you want to allow all latin letters you could use:

<code>
[a-z0-9A-Z'-_,\xC0-\xD6\xD8-\xF6\xF8-\xFF]
</code>

It includes the unicode ranges C0-D6, D8-F6 and F8-FF.
Ingo :geek:

| Atari 1040STE@32MHz | Amiga 1200 (ACA1220) | Atari 800XL (U1MB, SIDE2) | Atari 130XL (Sophia DVI) | C64 (1541 Ultimate II, Rev3 RFMod Replacement) | TI 99/4A (F18A, 32k, FlashROM 99) | Sinclair ZX Spectrum 128 (Stereo, DivMMC) | Amstrad CPC664 (512k, M4 Wifi) | ... |

User avatar
exxos
Site Admin
Site Admin
Posts: 7649
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: regex emphasis character matching ?

Post by exxos » Sat Sep 14, 2019 5:41 pm

Oddly though \xC0-\xD6\ type things doesn't work. But if I list individual codes or the letter ranges it does :shrug:

I had to do this in the end as its the only way I could get it working .

Code: Select all

[^ a-z0-9A-ZÀ-ÖØ-öø-ÿ,\-().+']
Of course the letters are a bit messed up on here.
4MB STFM 1.44 FD- VELOCE+ 020 STE - 4MB STE 32MHz - STFM 16MHz - STM - MEGA ST - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - HxC - CosmosEx - Ultrasatan - various clutter

https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.

Post Reply