Here is my issue, I am really perplexed when it comes to string parsing and manipulation in php. I am writing a database driven inventory using mysql and php. One of the issues is that there are multiple people who are able (by company rule) to add to this database. One of the items we track is calibration standards. We use a company serial as the serial for the database (which is the pk).
Some people enter the serial in this format "EU#######" the way it is supposed to be entered is "EU ########"
after the form grabs the serial number I need to be able to parse that string see if there is a space after the EU
if not I need to add it.
The regexp comes in in finding that particular substring in the begining of the string and determining if a space is already there or not.
Then I also need to know how to replace that string or simply add a space in between the numeric value and the U.
If anyone could help me or point me to the right functions to make it work that would help alot. Also if anyone has any recommendations on good understandable reading on Regexp and string manipulation I would be grateful, as those are weak areas for me.