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

  • Home
  • SEARCH
  • 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 8306369
In Process

The Archive Base Latest Questions

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

function get_last_word($sentance){ $wordArr = explode(‘ ‘, $sentance); $last_word = trim($wordArr[count($wordArr) – 1]); runDebug( __FILE__,

  • 0
function get_last_word($sentance){
    $wordArr = explode(' ', $sentance);
    $last_word = trim($wordArr[count($wordArr) - 1]);
    runDebug( __FILE__, __FUNCTION__, __LINE__, "Sentance: $sentance. Last word:$last_word",4);
    return $last_word;
}

i want to remove all text between {}
result should be:

function get_last_word($sentance){}

i have tried

{+.*}

and its working only when curly brackets are on same line

  • 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:19:10+00:00Added an answer on June 8, 2026 at 6:19 pm

    Newer version of Notepad++ supports multi-line matching (I am now using 6.1.3)

    In the Find/Replace dialog, next to the “Regular Expression” radio button, there is a checkbox called “. matches newline” which means multi-line matching.

    Then, use \{.*?\} (which is a ungreedy match) to achieve what you want.

    Beware that it does not match braces for you. For example

    foo {
      bar {
        blabalbla
      }
      xxx {
        yyy
      }
    }
    

    will give you

    foo {}
      xxx {
        yyy
      }
    }
    

    (I believe there are other questions in SO about brace matching in regex, you may have a look, though I wonder if they will work in notepad++)

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

Sidebar

Related Questions

Can I get the parameters of the last function called in traceback? How? I
$count = 5; function get_count() { static $count = 0; return $count++; } echo
I am writing a function in T-SQL returning the last day of the month
I have this function function get_last(){ $.ajax({ url:'fronta.php?get_last&last=1', success:function(data) { var last = parseInt(data);
See this Link how to get last 10 rows using any aggregate function like
function get_arr($arr) { unset($arr[0]); } $arr1 = array(1,2); $arr2 = array(1,2); get_arr(&$arr1); get_arr($arr2); echo
I get error: ORA-06575: Package or function GET_CONC_NAMES is in an invalid state When
I've a php function to get some data from mysql database: function get_persons() {
Can anyone describe the following php function: function get_setting_value($settings_array, $setting_name, $default_value = ) {
Given this function: > function Get-ArrayOfArrays() { (1,2),(3,4) | % { $_ } }

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.