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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:07:56+00:00 2026-06-03T14:07:56+00:00

The problem is following: I am having a Javadoc-generated HTML file containing Java class

  • 0

The problem is following: I am having a Javadoc-generated HTML file containing Java class names and some additional information, like this:

{@link ml.foo.bar.BazAccEd} (Text) Some text
{@link ml.foo.bar.BazAccGrp} (Text) Some text BazAccGrpList
{@link ml.foo.bar.BazAccEdOrGroup} (Text) Some text {@link.ml.foo.bar.BazAccEdList}

I need to extract from it (using Ant regex capabilities) only the short names of Java classes and only where they are parts of links, inserting commas in place of the original ordinary text, so that the sample above would produce

BazAccEd
BazAccGrp
BazAccEdOrGroup, BazAccEdList

It probably isn’t anything too complicated yet I fail to come across the correct regular expression that would parse only the links and extract the correct data from them. Thanks in advance.

  • 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-03T14:07:57+00:00Added an answer on June 3, 2026 at 2:07 pm

    This should work, given the inputs you provided. It works by capturing the text between a period and a closing curly brace:

    \.([A-Za-z\d_]+)(?=})(?:.+\.([A-Za-z\d_]+)(?=}))*
    

    This will return two captured groups \1 and \2. In order to get the comma replace working correctly, you’ll have to check to see if there’s anything in \2. If so, insert a comma between \1 and \2.

    Explanation:

    \.([A-Za-z\d_]+)(?=}) # look for a period, characters, and lookahead for closing curly brace. Capture the characters
    (?:          # open a non-capturing group
    .+           # gobble up characters until ...
    \.([A-Za-z\d_]+)(?=}) # ... you find the same thing as in the first line above
    )*           # make the non-capturing group optional
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having the following problem in Java (I see some people are having
I'm having some difficulties with the following problem: I'm making a little game where
I'm having the following problem. Imagine my mySQL table looks like this: id range
I'm having the following problem in python. I need to do some calculations in
I am having the following problem. I have a main project, and some extra
I am having the following problem: public class A { public A(X, Y, Z)
I've written an IRC bot in java, but I am having the following problem
I'm having the following problem. I created a application context file for spring.net. The
I'm having the following problem, and would love some pointers in the right direction.
I'm having following problem. I should convert a control to a certain type, this

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.