Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to drop start & stop code when barcode scanned

Status
Not open for further replies.

croiva25

Technical User
Dec 3, 2003
125
AU
Hi guys, I hope somebody can help me or point me in the right direction at least.If I have a product that when scanned into the web site will scan as a single piece of string but it is really made out of start code - A0, componeneet code - 00150, stop code 3B, how could I drop prefix and sufix when the product is scanned so it only scans the actual product code.


Any help is appreciated.
 

Is the "componeneet" code (is this the same as the "actual product" code) always 5 numerical digits long prefixed by the 2 characters "A0" and suffixed by the 2 characters "3B"?

If so, you could use the simple substr method of the string object. If not, RegExp might have to be used.

Hope this helps,
Dan


The answers you get are only as good as the information you give!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top