V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  jfcherng  ›  全部回复第 18 页 / 共 18 页
回复总数  348
1 ... 9  10  11  12  13  14  15  16  17  18  
2016-01-05 20:48:46 +08:00
回复了 yumijie 创建的主题 PHP PHP 用正则表达式怎样实现这个功能?
$file = file_get_contents('file.txt', 'r');

$one = $two = [];
$lines = explode("\n", $file);
foreach ($lines as &$line) {
if (preg_match('/[aeiou]/S', $line)) {
// if (strpbrk($line, 'aeiou') !== false) {
// if (strcspn($line, 'aeiou') < strlen($line)) {
$one[] = &$line;
} else {
$two[] = &$line;
}
}
$one = implode("\n", $one);
$two = implode("\n", $two);

file_put_contents('one.txt', $one);
file_put_contents('two.txt', $two);
2015-12-03 01:48:55 +08:00
回复了 JiaFeiX 创建的主题 PHP PHP 7 正式版发布! 两倍性能提升 以及鸟哥的感言
鳥哥:他們在爭什麼?
2015-10-26 19:39:48 +08:00
回复了 jaymiao 创建的主题 Sublime Text sublime 删除单词和持续选中
1.
{ "keys": ["ctrl+alt+'"], "command": "delete_word", "args": { "forward": true } },

2.

{ "keys": ["ctrl+alt+shift+l"], "command": "move", "args": { "by": "word_ends", "extend": true, "forward": true } },

你想要的答案可在 sublime console 中使用 sublime.log_commands(True) ,按下按鍵便會印出命令。
上面是我自己使用的映射。
ctrl+shift+space
Expand selection to scope 也許有些接近
2015-08-26 22:23:44 +08:00
回复了 Tianpu 创建的主题 PHP mb_*系列函数真是慢啊,这种原生函数有什么好的替代品吗?
同問具體到底如何使用了這些 mb_* 函式
2015-08-16 18:33:03 +08:00
回复了 wz200901 创建的主题 PHP php 提交表单如何自动发邮件?
2015-07-07 15:52:44 +08:00
回复了 Banio 创建的主题 Sublime Text sublime text 2 能改变选中字体的颜色吗
修改主題文件就可以了。
http://i.imgur.com/0idtmZt.png
1 ... 9  10  11  12  13  14  15  16  17  18  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5965 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms · UTC 01:53 · PVG 09:53 · LAX 18:53 · JFK 21:53
Developed with CodeLauncher
♥ Do have faith in what you're doing.