问题标签 [bbedit]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
regex - 如何在BBEdit中匹配外来词
我一直在研究一种在 BBEdit 中查找和替换外来词的方法,但我遇到了问题。经过研究,我遇到了正则表达式-匹配外来字符的正则表达式是什么?这使我进入了 Regular-Expressions.info 并显示了一个文本块:
在 Perl、PCRE、PHP、Ruby 2.0 和 Just Great Software 应用程序中,匹配单个字素(无论是编码为单个代码点还是使用组合标记编码为多个代码点)都很容易:只需使用 \X。
当我有一个词时(是的,这是为了测试而编造的)ōallaōallaēēalla
我不能用[A-Za-z]*
整个词代替它在段中工作,我能想出的唯一解决方案是([A-Za-z]*\X{1,10})
. 是否有另一种不会太贪婪并且会拉整个单词而不是分段拉的替代方法?
regex - 使用 grep 将空格转换为 BBEdit 中的制表符
我正在使用 grep 将 4-white-space 转换为 BBEdit 中的单选项卡。我正在将 Python 代码中的空格转换为制表符。以下工作正常:
但是,为什么以下是删除回车。它不应该给出相同的结果。
notepad++ - Notepad ++中的“包含”功能的“处理线”
在 TextWrangler 和 BBEdit 中有一个“包含进程行”功能。有谁知道这在记事本++中是否可用?我还没有找到它,如果有的话。
或者,是否存在其他可能具有此选项的 PC 软件?
xml - BBedit,删除两个字母之间的不同文本
大家好,我有很多使用这种格式的行(如 6000):
我需要从所有行中删除 Componentinfo 到 / 之间的文本,结果将是这样的:
有什么办法可以自动做到这一点?谢谢大家
configuration - BBEdit:文本过滤器无法处理元音变音 (ä,ü,ö)
目标是:将文本格式化为列。
我在 BBEdit 11.6.4(最新版本)中创建了以下文本过滤器:
我将它应用于以下文本(UTF-8 文档):
预期结果:
实际结果:
一旦文本中存在变音符号,插入的空格数就不正确。似乎 BBEdit 的 reg ex 机器以一种特殊的方式处理变音符号。
你知道解决办法吗?
注意:文本过滤器适用于任何没有变音符号的文本。
sql - How to use grep to change a column
and thanks in advance. I have a huge database where all lines start like this:
(497, 36390, 495, 88, 89, 2, 'xxdurango/a-...
(498, 36391, 1, 93, 100, 1, 'xxsalamanca...
(499, 36392, 498, 94, 95, 2, 'xxsalamanca/noti...
(500, 36393, 498, 96, 97, 2, 'xxsalama...
(501, 36394, 1, 101, 108, 1, 'xxg...
I need to change the third column after (#, #,
I am trying to use grep <.,.,> <(.,.,>
all this grep commands select other values in the lines.
I want to make a search and replace (using BBEdit), all of the third column needs to change to the same value.
Need to search for: begining of line,+ numeral1 (,) numeral2(,)
Or something like: begining of line, 3digit number (,) four digit number (,)
Any hint?
thanks
html - 在 AppleScript 和 BBEdit 中如何检查链接?
在 BBEdit 中,快捷方式 ++ 下的命令可以Markup -> Check -> Document Links
检查cmd所有链接。当我查看它下面的字典时,它显示:controlkBBEdit > HTML Scripting -> check links
但是当我尝试针对一个项目编写脚本时:
item
当我尝试根据文件名进行检查时,我得到一个错误:
如果我尝试,我仍然会遇到同样的错误:
我得到一个返回的{}
。认为这是不添加的问题,with show results
我将其更改为:
但我得到了回报activate
当我通过谷歌搜索时,我无法找到一个解决方案,即是否可以返回一个布尔值,即 HTML 文件中的链接在通过内容编写脚本时是否有效。所以我的问题是,我怎样才能让 AppleScript 告诉我链接在 BBEdit 中有效check links
?
list - AppleScript 如何查找模式并将其设置为记录或列表?
在 AppleScript 中,我知道如何通过以下方式进行典型查找:
我可以进行多文件搜索查找:
但我想返回 find multi 结果并将其保存到文件中,所以我想我需要将其保存到记录或列表中,然后重复输入,但是当我尝试时:
或者:
我收到以下错误:
此表达式的某些部分未返回任何结果。
为什么没有将查找设置到记录或列表中?有没有办法可以设置多文件搜索的功能?
list - How to turn an AppleScript list into a string
Trying to learn how to use AppleScript records and lists to their upmost potential I've been trying to create a report of a BBEdit project but I'm finding very limited documentation. I asked a question yesterday trying to figure out why my find pattern wasn't working but after finding out that the issue was from me lacking returning results:true
I was able to get the result record and I verified it was a record after reading Class and running:
Since it says it's a record I reviewed here and ran length of findFunction
and count of findFunction
and they both returned 2. I was curious to know what the two items were in the record so I used return findFunction
and was told there was:
Wanting to know where and what files the matches were located in the list, I did some more searching and read Lists and records and ran:
it returned the list items and checking the new variable with get count of theMatches
I am able get the quantity of items in the targeted list inside the record. When I review what's in the list (learned from: How to get a value from a list with a string in AppleScript? and Searching for items in list) I am able to conclude that when using the find
in BBEdit every item in the list contains:
Experimenting with an item I set a variable with:
and checked to see if it worked with:
and a dialog with the full file path was displayed. Trying to utilize DRY I created:
Wanting to add any of the mentioned above to a file with something like:
I recalled being able to use the clipboard and found Set clipboard to Applescript variable? so I added:
but my issue I'm running into is how can I take every item in the list found_matches
and add it to the clipboard an item on each line? I thought about using a repeat
but I get an error when I try:
With a message of:
The variable matchesItems is not defined.
So how can I get every item from the list into the clipboard with every item on it's own line so I can paste all items from the clipboard into a new file?
fortran - 如何在 BBedit 或 Fortran 90 代码中添加代码段
我正在尝试将一个用 BBedit 编写的长 Fortran 90 程序文件与一个定义中断(当前是一条带注释的破折号行)分开。最好只运行某些中断之间的部分,类似于 Matlab 对&&
.
我目前有类似的东西:
我怎样才能运行第 1 部分而不运行第 2 部分(反之亦然)而不注释掉一个部分?