Skip to content

Instantly share code, notes, and snippets.

use strict;
use warnings;
use YAPE::Regex::Explain;
my $regex = qr/\G([\w-]+).+?\b/;
my $xplain = YAPE::Regex::Explain->new($regex);
print $xplain->explain;
The regular expression:
@fghber
fghber / perl-one-liners
Created April 17, 2018 06:36
Perl One-Liners
Useful One-Line Scripts for Perl Dec 03 2013 | version 1.10
-------------------------------- ----------- ------------
Compiled by Peteris Krumins (peter@catonmat.net, @pkrumins on Twitter)
http://www.catonmat.net -- good coders code, great reuse
Latest version of this file is always at:
http://www.catonmat.net/download/perl1line.txt
@fghber
fghber / README.md
Created April 17, 2018 05:17 — forked from joyrexus/README.md
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

RegEx

Online Regex Tester Suites & Code Generators

  • regex101 Online regex tester for PHP, PCRE, JavaScript and Python that highlights pattern and matches on the fly. Also features a code generator and a regex debugger!
  • myregextester Sports a separate regex split tester and allows to optimize patterns (I guess this is based on Perl's Regexp::Optimizer module).
  • regexr Online regex tester with good regex replace and explain functionality.
  • debuggex Shows neat expression diagrams (not active anymore).
  • regexper translates regular expressions into an SVG image (for documentation or embedding)
  • RexV2 Evaluator for PHP PCRE, PHP Posix!, Perl, Python, Javascript, Node.JS!
"""
Author: Jeff Petkau
This code is in the public domain. You can run it, copy it, change
it, sell it, eat it, or claim you wrote it; I don't care.
Source: http://web.archive.org/web/20071024164712/http://www.uselesspython.com/jpetkau1.py
inverse regex:
given a regular expression string, produces random strings that
match the expression.
@fghber
fghber / NicePythonLibraries.md
Last active December 22, 2017 16:59
Nice Python Libraries

Data Science

Dask Dask is a flexible parallel computing library for analytic computing.

Windows

Pywinauto pywinauto is a GUI automation library written in pure Python and well developed for Windows GUI. At its simplest it allows you to send mouse and keyboard actions to dialogs and controls on both Windows and Linux.

@fghber
fghber / Moodle-RestCreateUser.cs
Last active November 10, 2022 08:41
Create User with Moodle Rest API
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization.Json;
@fghber
fghber / Online code utilities.md
Last active November 25, 2023 11:32
Online code utilities

Web IDEs

ideone Ideone is an online compiler and debugging tool which allows youto compile source code and execute it online in more than 60 programming languages and share links to the code.
repl.it Like ideaone, can also install missing Python packages.
Onlilne GDB Online compiler and debugger forC, C++, Python, Java, PHP, Ruby, Perl, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog, and more.
Coding Ground Advanced IDEs for C/C++, C#, GO, Java, PHP, Perl, Python, Octave/MATLOAB, R, Ruby, Scala, and compiler/interpreter for many other languages and frameworks.
JDOODLE very similar to ideone but a somewhat different set of languagse/compilers.

Dedicated: