"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years.I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing.Use the PRXPAREN function to determine which submatch to use.PRXPAREN returns the last submatch that was matched.
Build a Perl regular expression that concatenates the regular expressions for (XXX)XXX-XXXX and XXX—XXX—XXXX.matches the space (which is the preceding subexpression) zero or one time.The spaces match a space in the text that you are searching.If an area code matches the form (XXX), PRXPAREN returns the value 2.If an area code matches the form XXX, PRXPAREN returns the value 4.Perl regular expressions consist of characters and special characters that are called metacharacters.When performing a match, SAS searches a source string for a substring that matches the Perl regular expression that you specify.Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.Regex has never been included in C/C , until the very recent standards.For example, you can examine a string to determine whether it contains a correctly formatted telephone number. putlog "NOTE: Invalid business phone number for " first last business; datalines; Jerome Johnson (919)319-1677 (919)846-2198 Romeo Montague 800-899-2164 360-973-6201 Imani Rashid (508)852-2146 (508)366-9821 Palinor Kent . Spaces are significant in Perl regular expressions.They match a space in the text that you are searching.