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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:25:59+00:00 2026-06-18T21:25:59+00:00

In a language built on top of Java (so I cannot use regular parsers)

  • 0

In a language built on top of Java (so I cannot use regular parsers) I want to parse several sourc code files an extract the following information:

  • name and extends/implements part of public (inner) classes
  • public method declarations

So for a given file

public class A extends B {

  private int foo
  public int getFoo() {
    ...
  }

  private class Inner1 {

  }

  public class Inner2 {

  }
}

I would like to get with a single or several Regexps:

public class A extends B
public int getFoo()
public class Inner2
  • 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-18T21:26:00+00:00Added an answer on June 18, 2026 at 9:26 pm

    Let me know if this isn’t quite complex enough, but it will basically look for “public” followed by a space, then anything that isn’t an opening curly brace:

    public\s[^{]+
    

    Output is below:

    enter image description here

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

Sidebar

Related Questions

I've built an interpreter in C++ for a language created by me. One main
In my interpreter I have built-in functions available in the language like print exit
Language: PHP / Using Class Upload by Colin Verot About: Multiple Uploading The code
I have built up a website without any server side scripting/language, using only HTML/JavaScript/jQuery.
I have a code at the top of my program that looks like this:
I'm attempting to build a n-gram language model based on the top 100K words
I'm using the built-in ApplicationCommands to create a menu: <Menu DockPanel.Dock=Top> <MenuItem Header=_Datei> <MenuItem
I want to write actor style code for embedded processors and I am trying
I'm starting to learn backbone.js and I've built my first page and I want
For those that don't know, processing is a language/ Java library primarily used for

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.