Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8307113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:27:49+00:00 2026-06-08T18:27:49+00:00

Straight to the point: In ip ssh version 2 no aaa new-model ! dot11

  • 0

Straight to the point:

In

ip ssh version 2
no aaa new-model
!
dot11 ssid lala
    vlan 500
    authentication open 
    authentication key-management wpa
    wpa-psk ascii 100 40345352352352352352255325
!
!
crypto pki trustpoint TP-self-signed-3007141781

I want for instance search for a keyword ‘vlan’. My code returns ‘vlan 500’ which is correct. And it also returns all the lines where ‘vlan’ is.

Now I want the search program (php) to return the whole block. In above case:

!
dot11 ssid lala
    vlan 500
    authentication open 
    authentication key-management wpa
    wpa-psk ascii 100 40345352352352352352255325
!

or without ‘!’ ofcourse.

Any ideas for acomplishing this fast and effective?

ps: For now i’m using

while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
....

and

foreach(preg_split("/(\r?\n)/", $config) as $line){
...

in it, to get the lines where the search word appears.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:27:50+00:00Added an answer on June 8, 2026 at 6:27 pm

    I managed to achieve that by saving indexes of block startings. I got the block start by checking the spaces infront of each line, and the last block before I found the matching word was the index where I started to display lines.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Straight to the point: I have this javascript: for(item=1;item<5;item++) { xmlhttp=new XMLHttpRequest(); xmlhttp.open(GET,'zzz.php', true);
Straight to the point. The CSS ribbon is supposed to attach itself to the
I want to go straight to my point here, so is it possible to
I'll get straight to the point. I'm building a website on an existing database,
I have a very short and straight to the point question. When adding an
Ok, let's get straight to the point. I got 2 questions 1. Why self.StyleSetSpec(stc.STC_STYLE_DEFAULT,
I'll just go straight to the point. I want to move the items in
Hello all C++ Experts, It's me again. I will get straight to the point.
The question wasn't clear enough, I think; here's an updated straight to the point
My web app, up until this point, has been fairly straight forward. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.