Maybe like this, for instance?
««string»» as in ««^(.*)[a-z]*$»»
with the optional
«blockstring«string»blockstring»
as in
«FOO« int main() { werror(««hello, world!»»"\n"); } »FOO»
...mind that it's probably not a good idea to use 8-bit characters; those above are just an example. Even if I don't have a problem with it, most developers have a hard time typing in « and », so some effort should be put on replacing those with some ASCII solution.
/ Mirar
Previous text:
2003-09-21 13:57: Subject: wish: string with other quoting then \
Yes, I remember that discussion. I think it's a problem that could do with a good solution in Pike; but I *would* like to see a string syntax that solves three problems:
- doesn't use \ for in-string quoting
- doesn't need " or ' quoted nor any other regular regexp character
- doesn't need newline quoted and accepts newline in string
These problems are common when using regexps and writing HTML or Pike-writing programs.
If it should be usable for regexps, it should have a fairly short syntax (for instance two leading, two exiting characters), but to be really useful it could be nice with an optional exit string.
I don't think anyone would really like to use a regexp syntax without the 's; it's too widely used and it takes too much energy to relearn.
/ Mirar