Results 1 to 4 of 4

Thread: Find text between text

  1. #1

    Thread Starter
    Banned
    Join Date
    Feb 2009
    Posts
    15

    Find text between text

    Hello my question is how can I find text that is between other texts.
    Like: My birthday is on the tenth of January.
    Now I want my app to find wich text is between My birthday is on the and of January.
    I think in PHP it will look like this or something: My birthday is on the (*+) of January.

    Thanks,

    Vb6Hacker

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Find text between text

    If the text "My birthday is on the " and the text " of January." is fixed then you can use mid() to get the text.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    Banned
    Join Date
    Feb 2009
    Posts
    15

    Re: Find text between text

    What I'm going to be use it for is this:
    I get the source code of a web page, in the webpage the text: Your production: 100 Lumber. is used. Now I want to get the production out of the webpage. the number can be 10,100,1000 etc. So I can't use get the 2/3/4 character in the between production and lumber.

    Please tell me how to do this.

    vb6hacker

  4. #4
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: Find text between text

    Quote Originally Posted by vb6hacker
    What I'm going to be use it for is this:
    I get the source code of a web page, in the webpage the text: Your production: 100 Lumber. is used. Now I want to get the production out of the webpage. the number can be 10,100,1000 etc. So I can't use get the 2/3/4 character in the between production and lumber.

    Please tell me how to do this.

    vb6hacker
    The blank within the text appears to be a delimiter that you can look for to isolate the number you are searching for:
    Code:
    Dim MyText As String, MySearch() As String
    MyText = "Your production: 100 Lumber"
    MySearch = Split(MyText, Chr$(32))
    MsgBox MySearch(2)
    Doctor Ed

Posting Permissions

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



Click Here to Expand Forum to Full Width