Categories
Uncategorized

Simple Regex

Regex quick reference
[abc]     A single character: a, b or c
[^abc]     Any single character but a, b, or c
[a-z]     Any single character in the range a-z
[a-zA-Z]     Any single character in the range a-z or A-Z
^     Start of line
$     End of line
\A     Start of string
\z     End of string
.     Any single character
\s     Any whitespace character
\S     Any non-whitespace character
\d     Any digit
\D     Any non-digit
\w     Any word character (letter, number, underscore)
\W     Any non-word character
\b     Any word boundary character
(…)     Capture everything enclosed
(a|b)     a or b
a?     Zero or one of a
a*     Zero or more of a
a+     One or more of a
a{3}     Exactly 3 of a
a{3,}     3 or more of a
a{3,6}     Between 3 and 6 of a

options: i case insensitive m make dot match newlines x ignore whitespace in regex o perform #{…} substitutions only once

Categories
euphoria linux

Wee editor

Wee is a gtk based editor for euphoria. There is an instruction on euphoria wiki and we will follow that.


Categories
euphoria linux

Euphoria built in editor

Euphoria still have its own editor written in euphoria called edx.

To call edx one must type eui <path to edx.ex> which is too much to type 🙂

There is a way on euphoria to bind an ex script to interpreter to create an executable using eubind. Here is how i do it on linux.

Categories
euphoria linux

Euphoria on Linux

Euphoria is one of my first programming language which i learn by my self when i still at high school (1997). I get euphoria from shareware cd back then. Today im installing it on linux mint. Its have been a long time and now euphoria version is at 4.1.0 and maintained by openeuphoria.org.

Here is how i install euphoria.

Categories
ruby ubuntu

Install sqlite3 gem

To install sqlite3 gem we need to install development package for ruby and sqlite3 it self because of the need to compile gem native extension.

On ubuntu/mint/debian do as follow :

apt-get install ruby-dev

apt-get install libsqlite3-dev

Dont forget to execute as root.

After that we can execute gem install sqlite3.

Thats all … Bye.

Happy chinesse new year 2570 !