The majority of forums are now only available as archives, which means posting/editing is disabled.
The Anything and Everything forum is still open.
Time: 2013-05-24, 06:29am
Please
login or
register to post a reply.
Subject: substring question · Posted: 2004-09-22, 06:12pm
Rank: Unregistered
Hello,
Anyone know how I can accomplish the following :
MainForm.field123456 , value as follows : 'H037265 Project Name by C884933 in Location"
I want to assign the Location only to another field. The number of characters varies depending on the Project name and location.
Any ideas?
Thanks,
Shane
Subject: Re: substring question · Posted: 2004-09-27, 05:25am
Rank: ? (171)
Member #: 11947
well you can find the spaces around it... i suggest .lastIndexOf(" "
; to find the last space, then do that again with the returned value to find the next space and again to find the next..., then do a substring of that. if you know there are always "in location" at the end of the line this'll work fine.
Forum Quick Jump - Free2Code - Anything and Everything - Suggestions (Archived) - Challenges & Awards (Archived) - Chat (Archived) - Community Projects (Archived) - Bugs (Archived) - Programming Languages - PHP (Archived) - C/C++ (Archived) - Visual Basic (Archived) - Other (Archived) - Java (Archived) - Assembler (Archived) - Perl (Archived) - Python (Archived) - Programming - 3D Graphics (Archived) - Database design and management (Archived) - Physics (Archived) - Encryption and compression (Archived) - Networking (Archived) - Operating Systems (Archived) - Web Development - Graphics (Archived) - Web Design (Archived) - HTML/CSS (Archived) - Website Help/Review (Archived) - Flash (Archived) - Computing & Operating Systems - Hardware/Electronics (Archived) - Security (Archived) - Linux/UNIX (Archived) - Microsoft Windows (Archived) - Apple Mac (Archived) - Other OSs (Archived) - General Computing - Life/Other - Religion (Archived) - Politics/World Events (Archived) - Debate (Archived) - Arts & Entertainment - Books++ (Archived) - Music (Archived) - Movies (Archived) - Humor (Archived) - Games (Archived) - Sports (Archived) - Arts (Archived) - Archives - Tutorial Request (Archived) - Old Bugs 2 (Archived) - Free2Host Hosting (Archived) - Ada (Archived) - Functional Languages (Archived) - Career (Archived) - Old Bugs (Archived)
Pages: 1
Please
login or
register to post a reply.