String Manipulation Problem - Mid() To Extract 400 Char But At A "."
Ok, given a string up to any length, lets say 1,000 characters. I want to only display no more than 450 characters, but I want to end the string where a "." is found. In other words, have it go the 450 character, then from that point backwards, find the first "." That will be the end of what is displayed. I don't want hanging sentences in other words...
Getting the HTML code of a website, and then extracting specific information. Im trying to get flight information from a website, but there may be more than one flight in a search criteria...so i want it to loop untill it cant get any more.
I've managed to get the html from the other website, and i've also managed to get the first flight on the page.
I believe my problem is with this part of code (might want to review full code below):
I have a string (ie.1.0.1.39) I want to replace the number after last "." with another number. What would be the best way to do it? the lenght of the number after last "." may change and the lenght of the number to be replace varies as well
I have a dynamic string where the length varies.I need to write a function that will return part of a string, placed between first 2 symbols and last 3 symbols. For example the string DEVELOPMENT will return the following: ...
I have a very long string, that I need to cut up into more usable sections and display or write to text file. It should: Read the string in, move along the string x number of characters then find the nearest end of the sentance, eg. a . or ? write a new line and do this again. Basically I want to end up with a number of lines of full sentances of a similar length.
This looks elementary but I dont know how . How do I remove the trailing text after a symbol @. my_username@email.com and wanted my_username to remain as a result?
I have a first name last initial, all displayed as one. I want to break it appart & show capital letters on the initials. IE: "johnd" > "John D"
Did a search around the forums, but only found info on the "replace" function. Don't think I could do this with that function alone. This should be a simple problem, but I'm pretty new to asp (not to programming though).
I have results from a database which reads like this on my browsers page
20031231
Now I would like to change this so that I can make it look like this
31/12/2003
I am assuming that in ASP there is some kind of function that allows you to extract the string character by character and the concatenate it back together, but I don’t know what it is???? Could someone please pint me in the right direction???
I have an IP Address, for example 15.65.325.98, and I need it to return everything after the third dot including the dot. So in this case, it should return .98. The end of the IP will be dynamic and may contain 1,2, or 3 characters which is why a simple Right() Function will not work.
I have a client with a database whose author didn't do any type of form verification. Hence, in the "price" field, there are values such as 213000, $32,400, 5000 USD, etc.
What I am hoping is that some might tell me how to take a string, cut out all white space first, then go character by character to test for INT. Once done, count the characters, insert a "," where appropriate, and display on a page? Can this be done?
Ive been searching the net now for about a week for someway to extract all of the links and images out of source code. I want to make a search engine. I can get the HTML of an entered URL, but now I need to EXTRACT all of the links e.g href, src and I want to place them into an access database.
what i am trying to do is i have a session called "link" and in that session is a web address "http://www.google.com/" and what i am trying to do is if the last char is a "/" then i want to remove it .
I previously had a post on a problem with the Microsoft SQL server, when I was trying to compare a record in the database with an inputed record, if the record in the database was not exactly the same length as the inputed record, it would not match. i.e. user codes = OAK,BRANT,QUYOU etc.
Unfortunately these records have already been made and they vary in length from 2-5 characters. Im programming in VBscript, does anyone know any functions which will rectify this problem?
i've tried the trim function but this has no effect, I could just change the length of the column so that they are all a similar length and thus will all be comparable, however this is certainly not ideal as an id code only two characters long is not unique, some of the records will clash.
I would like to avoid changing all the records as there are 25 different codes for about 10,000 records. im sure there is some code which could accomplish this but ideally I would like to solve the problem at source.
Can someone tell me the maximum character length of a variable passed to an ASP page via a POST form (i.e. not through the querystring)? I read somewhere that said it was 1024 characters but that can't be right.
I have this piece of code in an .asp file. I call this file through a form and I send an email
Set myMail=CreateObject("CDO.Message") myMail.Subject="my subject" myMail.From=Request("email") myMail.To="myemail@mail.com" Dim Body Body = Body & "Name: " & Request("name") & VbCrLf Body = Body & "E-mail: " & Request("email") & VbCrLf Body = Body & "-----" & VbCrLf Body = Body & Request("the_message") & VbCrLf
myMail.TextBody=Body
myMail.Send set myMail=nothing
The problem is when I try to fill in the form with greek characters. They appear in the email as ????? or very confused characters with no recovery.
I've been asked by a friend to try and code something that works like this and I would be able to except for the fact that it's on a IIS server without PHP.
That said, I wouldn't mind learning ASP now that I have a project to learn on, but I need to do it in decent time. Could anybody point me to a package that does something like this that I could pick apart and learn from, or point me to some worth while ASP text manipulation links that might get me a good start on learning what I need to get it done?
And as a last choice if I can't get it done quick enough, does anybody have any links to premade packages that I could purchase that would do the same thing?
My attendance system records time IN and OUT in the format 5:00 AM and 5:00PM. I want to generate a report that "how many IN in between 7:00 AM and 8:00 AM"
if have tested as rs("eventtime")>"7:00" and rs("eventtime")<"8:00"
its working but its the same result for AM or PM.How can i differentiate and test AM and PM.
I am researching option for doing the following in ASP:
1. Thumbnailing an image as it is uploaded and/or selected by user, basing the thumbnail size on the current image dimensions [hence need to detect image dimensions]
2. Rotate an uploaded image [portrait to landscape and vice-versa]
Googling I find a wide range of mainly commercial COM components for doing this and other manipulations.
I am wondering what is the most "standard" way of doing this in normal ASP (3.0). Do servers tend to have preinstalled components for this? Is there a set of components most commonly used?
I have a text file that I have to retreve certain parts of it, and store them into variables. *its a lot* You can download the txt file at the following location. What my main goal is to move down past the 2nd set of "****" and start to collect values. (the number of lines before the 2nd set of "****" could change) So i need to store each of the columes into an array. or something liekt hat.
I just need to get the seperated characters by " " into seperate variables for ALL the lines between the 2nd "****" and the 3rd .
I have short term project, and I haven't used ASP in a long time. I need to know about image manipulation, I need to take an image that is uploaded, and make a thumbnail of it, (as well as one about 50% scale).
I have a fairly simple access database that I want to be able to view/update/delete etc from a html page using asp. The database would be on a server and would use a dsn connection to it.