find a string in text

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default find a string in text

    how would i search a recordset field tofind out if it contains a word or not
    ?

    ads


    ceaseanddesist Guest

  2. Similar Questions and Discussions

    1. FIND Amount in String
      I have this: <cfset TempVar = "This is a test string to test the code"> I need to find the amount of times the word "test" appears in the above...
    2. Find and cut string
      Hi, I'm new to PHP, so please bear with me! =) Is there a nice little function to find a string between to html-tags? I.e. let's say I have a...
    3. [PHP] find string
      Isn't there an in_array function you can use? If (in_array($action, array(a1,a2,a3,a4)) { // do something } else { // do something else }
    4. find in string
      How can i count the number of times a string appears within another string. Thanks a...
    5. Find string in web page
      In article <4628ab88.0307091019.17e73755@posting.google.com>, Kirk Larsen <spamme@kirklarsen.com> wrote: : Sounds simple enough. I need to...
  3. #2

    Default Re: find a string in text

    VB Script:

    if instr("val",1) then
    do something
    end if

    HTH,
    bT

    "ceaseanddesist" <poorleno@ukip.com> wrote in message
    news:d6v2jt$9n0$1@forums.macromedia.com...
    > how would i search a recordset field tofind out if it contains a word or
    > not ?
    >
    > ads
    >

    Brandon Taylor Guest

  4. #3

    Default Re: find a string in text

    You didnt mention what language you were using. Brandon has given an ASP
    solution, and theres a PHP one below:

    if(substr_count($recordset_field,"word to find ") > 0){
    // Word has been found, put relevant code in here
    }


    --
    Gareth - TMM Dreamweaver
    [url]http://www.dreamweavermxsupport.com/[/url]
    [url]http://www.garethdp.com/[/url]

    PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
    [url]http://www.phploginsuite.co.uk/[/url]

    Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
    Co-Author: Practical Intranet Development - Apress
    Co-Author: Dreamweaver MX: Advanced PHP Web Development - Apress
    Co-Author: Dreamweaver MX: PHP Web Development - Wrox


    gareth Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139