Feeds:
Posts
Comments

Posts Tagged ‘regular expression’

There are several regular expression I use more often than I thought. This will be a comprehensive list of those expressions.

Get file extension. Useful if you need to replace file extension manually as I did with Xceed component
\.[^\.]+$

Check if the input string is UK Post code
[A-Za-z][A-Za-z]?[0-9][0-9]?[A-Za-z]?([A-Za-z]\s?[0-9][A-Za-z][A-Za-z])?
Clean up special characters that can break javascript function parameter
[\x00-\x09\x0B\x0C\x0E-\x1F\x27\x7F\x5C]|<[^>]*>|\s+

_cleanupRegEx [...]

Read Full Post »