Useful Regular Expressions

JavaScript

Convert a let functionName = (paramA, paramB) => { like notation to export default function functionName(paramA, paramB) (see React and Flux: Migrating to ES6 with Babel and ESLint:

let\s+(.+)\s+=\s+(.+)\s+=>\s+\{
export function $1\($2\) {

Transform var _functionName = function(param) { => export function functionName(param) {:

var\s+\_(\w+)\s*=\s*function\s*\((\w+)\)\s*\{
export function $1\($2\) {