Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. search string for "//pasword="

search string for "//pasword="

Scheduled Pinned Locked Moved C / C++ / MFC
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steven Richardson 0
    wrote on last edited by
    #1

    i need to search a string for "//password=" and have another string equal what comes after that so input=gyghgguy gy gyf gfy fy fk u//password=test pass=test

    J P 2 Replies Last reply
    0
    • S Steven Richardson 0

      i need to search a string for "//password=" and have another string equal what comes after that so input=gyghgguy gy gyf gfy fy fk u//password=test pass=test

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      If you're using std::strings, then you can call find on input to locate the substring you're looking for (the rest is straightforward). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      S U 2 Replies Last reply
      0
      • J Joaquin M Lopez Munoz

        If you're using std::strings, then you can call find on input to locate the substring you're looking for (the rest is straightforward). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        S Offline
        S Offline
        Steven Richardson 0
        wrote on last edited by
        #3

        sorry i am not sure how to use std::strings?

        J 1 Reply Last reply
        0
        • J Joaquin M Lopez Munoz

          If you're using std::strings, then you can call find on input to locate the substring you're looking for (the rest is straightforward). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

          U Offline
          U Offline
          Uwe Keim
          wrote on last edited by
          #4

          Or use Regular Expressions to find the string. -- See me: www.magerquark.de

          1 Reply Last reply
          0
          • S Steven Richardson 0

            sorry i am not sure how to use std::strings?

            J Offline
            J Offline
            Joaquin M Lopez Munoz
            wrote on last edited by
            #5

            I think you will find it extremely useful to read some book about C++. For instance, Bruce Eckel's Thinking in C++ is very good for starters, plus you can download it for free! There you can learn how to use std::strings and a lot more. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

            S 1 Reply Last reply
            0
            • J Joaquin M Lopez Munoz

              I think you will find it extremely useful to read some book about C++. For instance, Bruce Eckel's Thinking in C++ is very good for starters, plus you can download it for free! There you can learn how to use std::strings and a lot more. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

              S Offline
              S Offline
              Steven Richardson 0
              wrote on last edited by
              #6

              thanks for all you help i think i will get that book

              1 Reply Last reply
              0
              • S Steven Richardson 0

                i need to search a string for "//password=" and have another string equal what comes after that so input=gyghgguy gy gyf gfy fy fk u//password=test pass=test

                P Offline
                P Offline
                Paul M Watt
                wrote on last edited by
                #7

                If you are using the regular C-runtime libary with char* as your string you can use strstr(). This will search for a string inside of a string.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups