Regular expression of Clojure's Code Tree
See original GitHub issueRegular expression of Clojure’s Code Tree, It can display all defined functions and variables.
(?x)
(^(\(\s*(def[^\{\}\[\]\(\)\^\.\s:#@/\\']*))\s+(\^.*)*\s*(\^\{[^{}]+\})?\s*[^\{\}\[\]\(\)\^\.\s:#@/\\']+([\(\)\[\]\s \t]$))
|(^(\(\s*(def[^\{\}\[\]\(\)\^\.\s:#@/\\']*))\s+(\^.*)*\s*(\^\{[^{}]+\})?\s*([-[:alnum:]*+!_:\/.?]+))
|(\(\s*intern\s+(\^.*)*([-[:alnum:]*+!_:\/.?]+))
This regular expression is valid when applied in the function list of notepad++. display effect:
(def x1
(def x2
(defn f1
(defn- f2
(defmacro m1
(defhtml html01
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
19 Strings and Regular Expressions - Clojure
A "regex" is a string which defines a search pattern for other strings. Clojure uses the same Java regular expression abstraction while offering...
Read more >Regular Expressions · Practicalli Clojure
Regular expressions are a powerful and compact way to find specific patterns in text strings. Clojure provides a simple syntax for Java regex...
Read more >Regex Optimization in Clojure - camdez
Instead, we can compute an optimized regular expression where the A is only matched once and only then do we continue on to...
Read more >re-pattern - clojure.core - ClojureDocs
Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). ... ... Replaces all instance of match with replacement in...
Read more >Structure and Interpretation of Malli Regex Schemas - Metosin
Most developers are probably familiar with regular expressions of strings and their basic forms. Here they are in (JVM) Clojure and Malli forms:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Applied this fix. pls test.
Ok, it is good look now. note about regex:
-
in[]
must be escaped to not make the range (it will not be range\w-
but better escape)(def\w*)|(ns)
- no need in brackets heredef\w*
andns
must be space? then use\s+
attache the .lcf file.