Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 375068

Summary: Regex search exception for invalid regular expression
Product: [ECD] Orion Reporter: Silenio Quarti <Silenio_Quarti>
Component: EditorAssignee: Project Inbox <orion.editor-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 0.4   
Target Milestone: 4.0 M2   
Hardware: PC   
OS: All   
Whiteboard:

Description Silenio Quarti CLA 2012-03-22 11:15:48 EDT
Open an editor
Type Ctrl+F
Check "Regular Expression" and "Incremental search" in options menu
Type "\" in find text field and wait a bit (500 milisenconds)

You will get this exception:

Uncaught SyntaxError: Invalid regular expression: /\/: \ at end of pattern

I could hide these exceptions in textModel.find() and return no match, but I believe this has to be done higher up so that we can present the error to the user.
Comment 1 Anthony Hunter CLA 2013-05-27 14:33:35 EDT
I am not seeing this exception in I20130526-2230
Comment 2 Silenio Quarti CLA 2013-06-21 13:26:41 EDT
Still happens in latest.

Uncaught SyntaxError: Invalid regular expression: /\/: \ at end of pattern textModel.js:120
TextModel.find textModel.js:120
Find._doFind find.js:447
Find.find find.js:227
objects.mixin._handleInput textSearcher.js:182
_commandService.openParameterCollector.searchStringInput.oninput textSearcher.js:81
Comment 3 Silenio Quarti CLA 2013-09-11 15:08:35 EDT
The error message is reported to the user now instead of the console.

Fixed

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c611975b3b887f30ca6974f6ed18cbf8995d1ac5