Grab {\w+?} together

Published on Tue Mar 01 2022

Additional matching regexes for
Grab {\w+?} together

Password Validation

Checks for password containing at least 1 Upper case, 1 lower case, 1 digit and 1 special character, all together with a length of at least 8. (This pattern allows any order of the requried elements, other than what was been distributed here before)

How to get various values within a pipe delimited string

We have a pipe delimited text file and each new record is separated by a CRLF. Each record has a fixed number of pipes, but not every column or field is valued, so there may be 2 or more pipes together. Is there a way to write a regex to parse out the third or fifth value? Many thanks in advance.

Regular Expression to Validate File Path and Extension

Recently, I was looking for a regular expression to validate a file path and extension. I found several of them on Google, but none of them fit my requirement. So I decided to put together a version that suits my need. Here is the Regular Expression to validate the file path and extension and it is compatible with JavaScript and ASP.NET. I hope someone will find this information useful and that it will make your programming job easier. Hide Copy Code ^(?:[\w]\:|\\)(\\[a-z_\-\s0-9\.]+)+\.(txt|gif|pdf|doc|docx|xls|xlsx)$ Explanation Hide Copy Code ^(?:[\w]\:|\\) -- Begin with x:\ or \\ [a-z_\-\s0-9\.] -- valid characters are a-z| 0-9|-|.|_ (you can add more) (txt|gif|pdf|doc|docx|xls|xlsx) -- Valid extension (you can add more) Matches Hide Copy Code \\\folder\file.pdf \\\my folder\folder.2\file.gif c:\my folder\abc abc.docx c:\my-folder\another_folder\abc.v2.docx Non-Matches Hide Copy Code \\\folder\fi<le.pdf \\\folder\\file.pdf \\\my folder\folder.2\.gif c:\my folder\another_folder\.docx c:\my folder\\another_folder\abc.docx c:\my folder\another_folder\ab*c.v2.docx c:\my?folder\another_folder\abc.v2.docx file.xls