diff --git a/lib/blink.js b/lib/blink.js index c391a9f..83ee221 100644 --- a/lib/blink.js +++ b/lib/blink.js @@ -3,5 +3,5 @@ var marked = require('marked') module.exports = function (str) { var md = marked(str) // TODO - return null -} \ No newline at end of file + return md.replace(/@@([\w\W]+?)\@@/g, `$1`); +} diff --git a/lib/capture.js b/lib/capture.js index a08ee57..8f83737 100644 --- a/lib/capture.js +++ b/lib/capture.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO -} \ No newline at end of file + var result=str.match(/\d+/); + return result?result[0]:null; +} diff --git a/lib/capture_breakword.js b/lib/capture_breakword.js index a08ee57..b224f95 100644 --- a/lib/capture_breakword.js +++ b/lib/capture_breakword.js @@ -1,3 +1,6 @@ module.exports = function (str) { // TODO -} \ No newline at end of file + var reg=/\bx=(\d+)\b/; + var result=reg.exec(str); + return result&&result[1]; +} diff --git a/lib/quantified_group.js b/lib/quantified_group.js index a08ee57..6c522cb 100644 --- a/lib/quantified_group.js +++ b/lib/quantified_group.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO -} \ No newline at end of file + var regx=/^(0x[0-9a-fA-F]{2}\s*){8}$/; + return regx.test(str); +} diff --git a/lib/quotes.js b/lib/quotes.js index a08ee57..42cee8a 100644 --- a/lib/quotes.js +++ b/lib/quotes.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO -} \ No newline at end of file + var regx=/\".*?\"/g; + return str.match(regx); +}