小编Daa*_*aan的帖子

编辑单元格时按键是否会触发任何事件?

您按下(编辑)工作表中的特定单元格时,以任何方式捕获事件是否可行?

最接近的是Change事件,但只有在取消选择编辑的单元格后才能激活.我想在编辑单元格捕获事件.

excel vba keypress excel-vba

20
推荐指数
1
解决办法
6万
查看次数

比较两个数字并返回-1,0或1

是否有一个简单的数学函数可用于比较数字x和y,当x小于y时返回-1,当x大于y时返回1,当它们相等时返回0?

如果没有,是否会有一个优雅的解决方案(没有任何if人)将输出转换Math.Max(x, y)为这些回报?我想把它们自己分开,例如123/123 = 1但这会引入除以0的问题.

c#

17
推荐指数
3
解决办法
3万
查看次数

如何使用正则表达式模式在括号中提取子字符串

这可能是一个简单的问题,但不幸的是我无法得到我想要的结果......

说,我有以下几行:

"Wouldn't It Be Nice" (B. Wilson/Asher/Love)
Run Code Online (Sandbox Code Playgroud)

我必须寻找这种模式:

" (<any string>)
Run Code Online (Sandbox Code Playgroud)

为了检索:

B. Wilson/Asher/Love
Run Code Online (Sandbox Code Playgroud)

我尝试了类似的东西,"" (([^))]*))但似乎没有用.另外,我想使用Match.Submatches(0)这样可能会使事情复杂化,因为它依赖括号......

regex vba substring

11
推荐指数
1
解决办法
4万
查看次数

Set body size in CSS?

I just created a lockscreen theme for my iPhone. It works, but for some reason I cannot remove the black background space of the body, i.e. resize the body along the right and bottom edge of the lockscreen.

I created a short slideshow so you get the.. indeed.

Here's the relevant HTML and complete CSS code. Note that I added many unnecessary '0px' properties just to see if they'd make a difference:

<body>
<div id="background">
<img src="LockBackground.jpg" width="320" height="480">
</div> …
Run Code Online (Sandbox Code Playgroud)

css

5
推荐指数
1
解决办法
3万
查看次数

在Notepad ++中只保留引号之间的字符串

在Notepad ++中,我使用表达式(?<=").*(?=")查找引号之间的所有字符串.能够仅保留这些结果似乎相当微不足道.但是,我找不到一个简单的解决方案.

我认为问题是Notepad ++无法进行多项选择.但必须有某种解决方法,对吧?也许我必须反转正则表达式,然后找到/替换这些结果以最终得到我想要的字符串.

例如:

blablabla "Important" blabla
blabla "Again important" blablabla
Run Code Online (Sandbox Code Playgroud)

我想保留:

Important
Again important
Run Code Online (Sandbox Code Playgroud)

regex notepad++

3
推荐指数
1
解决办法
5327
查看次数

标签 统计

regex ×2

vba ×2

c# ×1

css ×1

excel ×1

excel-vba ×1

keypress ×1

notepad++ ×1

substring ×1