Regular expressions teach class
Here are some regular expressions constructed that I use everyday. These are tested in C#:
- Matching any character:
[abc]
- Matching any word:
b[^ "]*b
""
matching:"[^"]*"
- More advanced “” matching:
"(\"|[^"])*"
/**/
comments matching:/*[^*]**+([^/*][^*]**+)*/
- Matching HTML elements:
<[^<^>]*>
- Matching CSS
{}
content:{[^{]*}
…
tags: & category: -