Regular expression for UK-Mobile numbers with optional country code and spaces in number

Recently I was given a problem that UK Mobile phone numbers with spaces in the number are not being accepted by application as its convenient to write numbers like (+44 0791 452 1234 OR “0791 452 1234”) instead  (+447914521234  OR  07914521234) (dummy number used for illustration purpose only). UK mobile numbers are of 11 digit […]

Validation of web site address on server side using c-sharp and Regular expression

Validating web site address at server side in using c-sharp. A detail web site address  validation method where Regular expression is being used for a baisc web addrss validation, then web address is being splitted by dot and forward slash to check if it contains http: and if its defined more than once in […]

Regular expression Replace and Match used in managed sql

Every one knows the power of .net clr (Dot Net Common Language Runtime).  Following are are two functions which are being used by me in sql server 2005. RegexMatch function returns the true false (0/1); it takes two parameters input as characters or string and Regular expression to match. RegexRpelace function replaces the carachters passed […]

Power of CLR (Common Language Runtime) + SQL server 2005, Managed Assembly

Today I used Managed Assembly to use Regular Expression in SQL server 2005. I wanted to search for all records which contain special characters in my data and some foreign characters so I was using following SQL Query Select OrganisationId,organisationname from organisation Where organisationname like ‘%-%’ OR OrganisationName like ‘%&%’ OR OrganisationName like ‘%(%’ OR […]