Skip to content

Instantly share code, notes, and snippets.

@keithwongg
Last active July 24, 2024 09:40
Show Gist options
  • Save keithwongg/1cd6d9a74c865dff5e3a0748029ed278 to your computer and use it in GitHub Desktop.
Save keithwongg/1cd6d9a74c865dff5e3a0748029ed278 to your computer and use it in GitHub Desktop.

Revisions

  1. keithwongg renamed this gist Jul 24, 2024. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion notepad_plus_plux_regex.md → regex.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # Search 2 keywords in the same line
    # Notepad++
    ## Search 2 keywords in the same line

    Join 2 keywords with `.*`

    @@ -14,3 +15,11 @@ Notepadd++ > Find > Find what > Input regex
    ```
    PUT".*user
    ```

    # Sublime Text
    ## Search for a string that contains "api/user" and "SERVER-STATUS=500"
    ```
    (?=.*api/user)(?=.*SERVER-STATUS=500)\w+
    ```


  2. keithwongg created this gist Jul 24, 2024.
    16 changes: 16 additions & 0 deletions notepad_plus_plux_regex.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    # Search 2 keywords in the same line

    Join 2 keywords with `.*`

    Example:
    ```
    22/07/2024 11:20:00 +08:00 HTTP "PUT" "/user" responded 500 in 361.2326 ms
    ```

    Want all instances of `PUT` requests for endpoint `/user`.

    Notepadd++ > Find > Find what > Input regex

    ```
    PUT".*user
    ```