Tuesday, January 7, 2014

Notepad++ : Regular Expression

 

 Regular Expression Notepad++


 Finding Empty lines using RegEx :
  1. notepad++
  2. Ctrl-H
  3. Select Regular Expression
  4. Enter ^[ \t]*$\r?\n into find what, leave replace empty. This will match all lines starting with white space and ending with carriage return (in this case a windows crlf)
  5. Click the Find Next button to see for yourself how it matches only empty lines.
Or
 Use "EditPad pro"

  1. At the bottom click at the bottom.
  2. Enter "\n"
  3. Click on search

 --------------------------------------
\r\n - New line
\r$ - End Line
\r   - To Consider the following character as a RegEx Command

.    - Any single digit or a numeric
*   - Any number of times
.* - Any Char
\d - Any Single Digit
[a-z] - Any Single Digit Between a to z
x[a-z]*_\d_\d\r\n  - matches xa_1_1(new line )
-------------------------------------------------

No comments:

Post a Comment