Fabian Vilers wrote on 06 feb 2006 in comp.lang.javascript
:
> Hi all,
>
> I'm looking for a regular expression that can do the following:
>
> if matches: a~b§c~d
> replace by: a~§c~
>
> Sorry for posting something so stupid but I can't understand a word on
> regexp
If you do not understand, how would you possibly know it is stupid,
or that regex would be a good solution?
At least you would have to declare what you mean by ~ and §.
As I read it now, this code will do what you ask:
s = 'a~b§c~d'
alert(s)
s = 'a~§c~'
alert(s)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)