What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-09 10:50:04
/([a-z-0-9-]*) php
RedirectMatch 301 ^/news/([0-9]+)-(.*) /blog RedirectMatch 301 ^/news/([a-z]+)-(.*)/$ /blog/$1 These are regular expressions ("regex" for short). Specifically, Apache uses PCRE (Perl Compatible Regular Expression) syntax (the same as PHP, simi... Add solution -
Javascript 2022-03-07 03:40:04
create email from string in javascript
function validateEmail (emailAdress) { let regexEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; if (emailAdress.match(regexEmail)) { return true; } else { return false; } } let emailAdress = "[email protected]"; console.... Add solution -
Shell/Bash 2022-03-02 22:45:17
check if word at end of string regex bash
Just appreciate next solution example for your code implementation: S=finding if[[ "$S" == *ing ]]; then ...//some code More generally: if[[ "string_to_check" == regex_patten ]]; then ...//some code Add solution -
Shell/Bash 2022-03-01 08:05:03
dir files windows
# For finding file use dir followed by string matching file name or regex # pattern and add "/s" for searching recursively in subfolders: dir /s "regex_or_file_name" # For finding file contained in a searched directory use "/b&quo... Add solution -
Javascript 2022-03-01 00:50:02
get youtube id from url
// true when ID is found, false otherwise. //Extracts youtube ID <script type="text/javascript"> function youtube_parser(url){ var regExp = /^https?\:\/\/(?:www\.youtube(?:\-nocookie)?\.com\/|m\.youtube\.com\/|youtube\.com\/)?(?:ytscr... Add solution