GitHub user weand opened a pull request: https://github.com/apache/zeppelin/pull/2675
[ZEPPELIN-3060] Unable to use interpreter names with special characters (e.g. dash or underscore) [ZEPPELIN-3060] Unable to use interpreter names with special characters (e.g. dash or underscore) ### What is this PR for? This fixes a regression which was introduced with ZEPPELIN-3013. There is no restriction regarding characters when creating new interpreters. But when running a note the interpreter name was parsed using the regex %([\w\.]+).*, which only considered the word character class and dots. Interpreter names with special characters (e.g. _ or -) were not matched correctly. This change enables usage of interpreter names that use other characters by changing the regex group to %([^\s\(]+).*, which means: parse the interpreter name from % until any whitespace or open parenthesis. ### What type of PR is it? Bug Fix ### Todos - ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-3060 ### How should this be tested? Create an interpreter with a name containing one or more special characters, e.g. dash or underscore. Try running that interpreter. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no You can merge this pull request into a Git repository by running: $ git pull https://github.com/weand/zeppelin ZEPPELIN-3060 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/2675.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2675 ---- commit 7d715a0fcc8ee37059890926b282b163391118e1 Author: Andreas Weise <a.we...@avm.de> Date: 2017-11-16T20:09:36Z [ZEPPELIN-3060] Unable to use interpreter names with special characters (e.g. dash or underscore) ### What is this PR for? This fixes a regression which was introduced with ZEPPELIN-3013. There is no restriction regarding characters when creating new interpreters. But when running a note the interpreter name was parsed using the regex %([\w\.]+).*, which only considered the word character class and dots. Interpreter names with special characters (e.g. _ or -) were not matched correctly. This change enables usage of interpreter names that use other characters by changing the regex group to %([^\s\(]+).*, which means: parse the interpreter name from % until any whitespace or open parenthesis. ### What type of PR is it? Bug Fix ### Todos - ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-3060 ### How should this be tested? Create an interpreter with a name containing one or more special characters, e.g. dash or underscore. Try running that interpreter. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no commit 54c69ca1686338420797409b7ea6f79f609bef8d Author: Andreas Weise <a.we...@avm.de> Date: 2017-11-16T20:15:07Z Merge remote-tracking branch 'origin/master' ---- ---