归档 2016年1月

[LeetCode]String to Integer (atoi)

题目描述:

Implement atoi to convert a string to an integer.

Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.

Notes: It is intended ...

继续阅读

Eclipse正则表达式查找匹配多行

使用Eclipse的正则表达式(Regular expressions)查找替换(Find/Replace)功能时,如果需要匹配多行,可以在搜索表达式中添加(?s)参数。

例如从下面的HTML文本中匹配<p class="strong"></p>的段落内容

可以采用正则表达式:(?s)<p class="strong">.*?</p>

<!doctype html>
<html>
<head>
    <title>Example Domain</title>
    <meta charset="utf-8" />
    <style type="text/css ...

继续阅读

每日归档

上个月

下个月

归档