Common Regex Expressions

Today I had to write a regex for 'everthing after a specific string, but the the CRLF'

Spent 5 minutes, Googled it, read through a bunch of ... stuff. 

I'm going to create a collection of REGEXs that I use and put them here. 

If you'd like, mail your favorites to 'support@', and I'll add them. 

There's a link above to the .NET Dev menu, follow that and note where this article is, so that you can come back when you need it.

 

Related Articles

... and you 'll find more on the NET Development Menu

Regular Expression basics
[ -], [\s-] Both will match either a space or a hyphen 
\s space
\w word
 ? match 0 or 1 occurance
 . matches any single character
 * 0 or more occurances
 matches 'x' to the end of the line x.*$
 \r\n matches a carriage return

Text(.*)$ matches everything after 'Text', including 'Text', but not the CRLF

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences