Replace Function

Results 1 to 3 of 3

Thread: Replace Function

  1. #1
    Jeff Kovach Guest

    Default Replace Function

    Is there a way to search a field with a single letter("C" or "J") without returning sentences or words which have that letter in it?<BR><BR>I have looked at the function in VBScript called "Replace" however, I am designing a consultant skill search database and consultants who have computer language skills of "C" or "J" will return every record in a database with the letter "C" in a sentence or word.<BR>Hint: If they have "C" coded in our the database, it could look like one of the following examples:<BR>A) UNIX, C, Web technology, HTML, JAVA<BR>B) Visual FoxPro, SQL, WinNT; Visual Basic, Oracle and C/C++<BR>C) Java and C and COBOL<BR>D) C and Visual Basic<BR><BR>This is a very tricky search for the search engine and I have problems coming up with a solution since the letter C could be followed by a comma, slash, space before, or space after, or no space if it&#039s the first skill listed like example D above.<BR><BR>Thanks,<BR>Jeff

  2. #2
    Steve Cimino Guest

    Default Not replace, regexp

    Don&#039t do Replace... you need to code a regular expression to find exactly what you&#039re doing. Do a search on this site about regular expressions and see what you can come up with.<BR><BR>Be forewarned: They&#039re a bit tricky. Post again when you get stuck!

  3. #3
    Join Date
    Dec 1969

    Default RE: Replace Function

    I would say you can do a more narrow and exact search, say<BR>if you retrieve the column and store the contents in an array<BR>and then loop through it to search for the exact *Qualification*(ASP,JAVA)etc.In the process you can make use of lots of useful functions available in vbscript.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts