Only return what's between the brackets i.e. (a)

Published on Tue Mar 01 2022

Additional matching regexes for
Only return what's between the brackets i.e. (a)

Extract everything between TD brackets

This is used to extract everything between TD brackets.

Get text within pipe placeholders

Will return all matches of text between pipe placeholders, e.g. "This text has |two| placeholders |inside| of it" will return matches for two and inside.

Save everything between <code>...</code> brackets

This is what I created to paste in web page source code and regex to extract content between whichever HTML brackets that I choose.. In this case, it's the <code> HTML brackets.

replace between brackets 3

replace multiple matches of words in brackets with no brackets

Get Content within brackets

Get Content within brackets

Task 2, part 1

Finds all source numbers in square brackets

Brackets Items

This REGEX, allow extract all words in brackets [].

Find PHP object variables

Find PHP object variables, and replace them with (array)brackets.

get file Extensions

var fileExtensionPatter = /\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/ var ma1 = 'css/global.css?v=1.2'.match(fileExtensionPatter)[0]; console.log(ma1); // return .css var ma2 = 'index.html?a=param'.match(fileExtensionPatter)[0]; console.log(ma2); // return .html var ma3 = 'default.aspx?'.match(fileExtensionPatter)[0]; console.log(ma3); // return .aspx var ma4 = 'pages.jsp#firstTab'.match(fileExtensionPatter)[0]; console.log(ma4); // return .jsp var ma5 = 'jquery.min.js'.match(fileExtensionPatter)[0]; console.log(ma5); // return .js var ma6 = 'file.123'.match(fileExtensionPatter)[0]; console.log(ma6); // return .123

Find Chapter (eBook)

Find an specific TAG and return his content