Welcome Guest, Not a member yet? Register   Sign In
:( Think im going to have to use Regular Expressions :(
#1

[eluser]TornUp[/eluser]
hi all,

First off, let me explain my problem. im building a system that stores partnumbers within a database, the problem i have encountered is that these part numbers are not consistant(a customer could ask for partnumber: "abc 123" but it could be "abc-123"..) the solution to this problem is to strip all Special Chars apart from ABC... and 123... and then get my sales people to mearly search using "abc123"

This is where my problem is.. while inserting the data into the DB, i need to "purify" the part-numbers... but i don't know any Regular Expressions! lol... im guessing its RE is the best thing to use(with Preg_replace(); ) or does CI offer some kind of Lib/Helper that can do the same thing?

Thanks for reading. hope you can help Smile

Tom.


Messages In This Thread
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 09:18 AM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 10:01 AM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 12:22 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 12:42 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 02:17 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 03:57 PM
:( Think im going to have to use Regular Expressions :( - by El Forum - 10-22-2009, 04:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB