GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing javascript.info — Find quoted strings back to the lesson Find quoted stringsCreate a regexp to find strings in double quotes The strings should support escaping, the same way as JavaScript strings do. For instance, quotes can be inserted as
Please note, in particular, that an escaped quote So we should search from one quote to the other ignoring escaped quotes on the way. That’s the essential part of the task, otherwise it would be trivial. Examples of strings to match:
In JavaScript we need to double the backslashes to pass them right into the string, like this: The solution: Step by step:
In action: |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |