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 7794805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:52:58+00:00 2026-06-01T22:52:58+00:00

I would just like to ask some help in constructing a regex formula for

  • 0

I would just like to ask some help in constructing a regex formula for this example:

Brgy. Captain : Kgg. Constancia M. Reyes\nKagawad : Kgg. Henry A. Artisen\n             Kgg. Juliana S. Santos\n                Kgg. Sonia C. Alzona\n              Kgg. Fernandito L. Perez\n              Kgg. Ismael V. Capunitan\n              Kgg. Gregoria R. Sanchez\n              Kgg. Nerisa Maristañes

I am using Java in Ecplise IDE. I just would like to get the all the councilor names and then ignore all preceding and succeeding characters. This is what I would like to get:

  • Kgg. Constancia M. Reyes
  • Kgg. Constancia M. Reyes
  • Kgg. Juliana S. Santos
  • Kgg. Sonia C. Alzona
  • Kgg. Fernandito L. Perez
  • Kgg. Ismael V. Capunitan
  • Kgg. Gregoria R. Sanchez
  • Kgg. Nerisa Maristañes

Is this possible in the first place?

I tried using this regex as i have a google chrome app then can test a regex formula but failed to match it: (Brgy. Captain :).\\n+(Kagawad :).\\n+

  • 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-01T22:53:00+00:00Added an answer on June 1, 2026 at 10:53 pm

    The answer provided by Justin Pihony matches all of the given councilor names, but the last one. Maybe you tried to remove everything that matches instead of preserving.

    (\\n.*?)(?=Kgg)
    

    This one is the opposite. It matches everything between. But for it to work you have to add another \n to the beginning of the list.

    For eclipse I can recommend you the following plug-in for very fast testing of regular expressions: http://myregexp.com/eclipsePlugin.html

    And for basic understanding of regular expressions: http://www.regular-expressions.info/reference.html

    HTH

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

Sidebar

Related Questions

I would like to ask some help. This is not homework but it is
I would like to ask some Drupaler for help. Is it possible to show
I would like copy just file.xml without folder structure using overlays like this: <overlays>
I would like to learn ASP.NET and just wanted some input as to which
I would just like your feedback on something. Basically I have a value called
I am new to coding and would just like to know a bit more
I am pretty sure I cannot, but I would just like to double check
I just would like to know if it is possible (and if yes how)
I have an std::vector<unsigned char> with binary data in. I just would like to
I would like to upload files just like google mail does. I would want

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.