[erlang-questions] regexp sux!

Torbjorn Tornkvist <>
Fri Mar 9 13:54:12 CET 2007


As usual, the regexp module drive me nutts.
I simply want to do the equivalent to:

# from a bash shell

xx="<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>".
echo $xx | sed 's/\(.*xml\
version=.*encoding="\)\([a-zA-Z0-9_-]*\).*/\2/'
ISO-8859-1

So how do I do this with the regexp module ?

Cheers, Tobbe





More information about the erlang-questions mailing list