英文:
how to add tab character into test string section of regex101.com
问题
我正在使用regex101.com学习正则表达式。
在regex101.com的TEST STRING字段中,有时我想插入一个<kbd>Tab</kbd>字符。
然而,当我选择TEST STRING字段并在键盘上按下Tab键时,它并没有在TEST STRING字段中输入Tab字符,而是直接将我移到浏览器页面中的下一个可选择的功能。
我注意到我已经做了一些搜索,但到目前为止还没有找到如何在TEST STRING字段中添加Tab字符的答案。尽管我确信这是可能的,因为我看过一些视频,在视频中演示者成功地将Tab字符添加到了字段中。
我注意到我正在使用Windows 10,我的浏览器是Google Chrome。
如果有人能提供答案,将不胜感激。
英文:
I am using regex101.com to learn regex.
There will be cases where I want to insert a <kbd>Tab</kbd> character within the TEST STRING field of regex101.com.
However, when I have the TEST STRING field selected and press the tab key on my keyboard, it doesn't enter the tab character within the TEST STRING field, but rather it just moves me on to the next selectable feature within the browser page.
I note I have done a bit of googling but so far haven't been able to find the answer to how to add a tab character within the TEST STRING field. Although I know for sure it is possible to do this given that I have seen a few videos where the presenter successfully adds a tab character into the field.
I note that I am using Windows 10 and my browser is Google Chrome.
Would greatly appreciate if anyone could provide an answer to this.
答案1
得分: 4
看起来 regex101 可以使制表键由编辑器翻译,而不是直接传递到系统,其中它会改变焦点到制表顺序中的下一个控件。
只需在设置中取消选中该框。
显然,首选项会保存在您的浏览器会话 cookie 中。
英文:
Appears regex101 can enable the tab key to be translated by the editors
instead of being pass-through to the system where it changes focus to the
next control in the tab order.
Just uncheck the box in Settings .
Apparently preference gets saved in your browser session cookies.
答案2
得分: 2
Typing a Tab into a text editor and copy-pasting (Ctrl + c / Ctrl + v) it into the browser form is an easy solution. Just make sure your editor is not configured to auto-replace tabs with spaces.
Another way would be using a keyboard combination to enter the ASCII or Unicode character code (see this superuser post). For Windows, that should be Alt+0+9 (Note: apparently the numbers need to be entered on the numpad).
Finally, depending on the browser you use, there might be browser extensions that facilitate what you want. There used to be one called Tabinta for Firefox and one for Chrome called chrome-textarea-formatter, but I believe neither of them is still maintained.
英文:
Typing a <kbd>Tab</kbd> into a text editor and copy-pasting (<kbd>Ctrl</kbd> + <kbd>c</kbd> / <kbd>Ctrl</kbd> + <kbd>v</kbd>) it into the browser form is an easy solution. Just make sure your editor is not configured to auto-replace tabs with spaces.
Another way would be using a keyboard combination to enter the ASCII or Unicode character code (see this superuser post). For Windows, that should be <kbd>Alt</kbd>+ <kbd> 0 </kbd> + <kbd>9</kbd> (Note: apparently the numbers need to be entered on the numpad).
Finally, depending on the browser you use, there might be browser extensions that facilitate what you want. There used to be one called Tabinta for Firefox and one for Chrome called chrome-textarea-formatter, but I believe neither of them is still maintained.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论