Un outil de remplacement de texte qui semble avoir une ergonomie un peu plus confortable que sed https://github.com/c0stya/trre #commandline #regexp #opensource
The {rematch2} #RStats is a “small wrapper on regular expression matching functions regexpr and gregexpr to return the results in tidy data frames.” By @gaborcsardi . On CRAN.
https://github.com/r-lib/rematch2#readme
#RegExp #RegEx
New at PragProg
Staffan Nöteberg helps you really understand how the machinery works under the hood. Learn advanced tools like reluctant, lookbehind and nondeterministic finite automata to write efficient and elegant regexes with ease.
In this illustrated guide, you gain precisely that understanding., even with no prior knowledge of Regular Expressions.
Another resource for regular expressions in R: A Shiny app by Adam Spannbauer
App: https://spannbaueradam.shinyapps.io/r_regex_tester/
Blog post: https://adamspannbauer.github.io/2018/01/16/r-regex-tester-shiny-app/
Need help with regular expressions in R? Check out the RegExplain RStudio add-in by @grrrck
https://www.garrickadenbuie.com/project/regexplain/
https://gugod.org/2024/11/regexp-digits/
如果你在用正規表示式的 \d 在驗證來自使用者的輸入的話,你得再想想。
A website to write, test, and share regular expressions!
(I think this is pretty well-known, actually...)Updated version of my ideas for improving the JavaScript RegExp API: https://gist.github.com/rauschma/8db338a96f9ead8df0714d233e81fed4
@tripleo You’re thinking of #Perl’s “taint mode” (stop your teenage giggling), where outside data is untrusted unless it’s the extracted subpattern match in a #RegularExpression.
It’s only enabled under certain conditions. Read about it in the `perlsec` manual page: https://perldoc.perl.org/perlsec#Taint-mode
I see a lot of unnecessarily specific regexs (typically excessive captures & pointless `.*$`) being used. Logic says they'll be slower so I spent about 90 seconds testing an example on 3 in-browser JS benchmark apps.
Comparing:
`/^(Hello), this is a string (.*)$/` to
`/^Hello, this is a string /`
the latter is 1.5-5x faster on all 3 apps.
#RegEx #RegExp #RegularExpression
Une idée incroyable : au lieu d'interpréter le pattern d'une expression régulière à l'exécution, cette librairie crée une classe Java exécutant le pattern au moment du build. Ca optimise considérablement l'exécution du code, évidement. Par contre, je ne vois pas (encore) comment intégrer ça dans un projet "classique" : pas de plugin maven ou de configuration de compilateur. Il y a donc … https://github.com/hyperpape/needle #java #regexp #library #optimisation #compilation #opensource
Une belle histoire d'expression régulière sur un sujet en apparence simple, mais aux conséquences désastreuses pour les performances. Ce qui est drôle, c'est que la bonne solution, c'est peut-être bien de passer par un parser XML qui éliminera correctement les commentaires. https://regexide.com/ #javascript #regexp #performance #algorithme #design
To my fellow #ActuallyAutistics who are also into programming. Can you handle #RegEx / #RegExp?
Up to how much complexity?
When I was younger, it was easy. Today, I have to use a test tool! ^_^;;
#Autistics #Autism #ActuallyAutistic #Autistic #AutismSpectrum #AskingAutistics
In JavaScript the "empty" regular expression literal is written `/(?:)/` since the parser would erroneously take `//` as the start of a single-line comment
https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5
#JavaScript #ECMA #Empty #RegExp