sensalim Posted August 12, 2008 Posted August 12, 2008 (edited) I have this p[\s*|\.|\,]*o[\s*|\.\,]*b\s*o\s*x[\s*\|\.|\,]*.* but I want to strip the POBox. Examples: "POBox111" --> "111" "222 PO Box 333" --> "333" "44P OB o x 55" --> "55" How do I fix my pattern? backreference? Any help? Thanks! Edit: or I could use (x)(\s*)(.*) but I still need to ignore the 'x'... Edit: of course I could just strip the first letter (x) from the result afterwards, but would like to know how to do this in regex properly. Thanks! Edited August 12, 2008 by sensalim
sensalim Posted August 12, 2008 Author Posted August 12, 2008 (edited) What is (?i) ? It doesn't work on my t-sql (This is actually for my project in microsoft sql server management studio) This might be it: (?<=x)\s*.* Edited August 12, 2008 by sensalim
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now