Regex search on webpage in Chrome

Regex search on webpage in Chrome

Using Javascript to match regular expressions

  • in console log
  • var p=/.*(regu).+?\ /gi; console.log( document.body.innerText.match(p) );

    use element text

  • in console log
  • 在 element 的頁面直接搜尋

use extension

  • Chrome Regex Search
    • Keyboard Shortcuts:
      • ENTER: select next regex match
      • SHIFT+ENTER: select previous regex match
        • To setup a Keyboard Shortcut to open the Popup:
          • In your browser, go to chrome://extensions/
          • Find ‘Chrome Regex Search’ and click the box
          • Type your custom command (ie CTRL+SHIFT+F)
          • Now whenever, you want to open the popup simply enter your custom command.
  • Regex Search

reference