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

The Archive Base Latest Questions

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

this is my string com.element.subelement I want to use propertyregex to replace all .

  • 0

this is my string com.element.subelement

I want to use propertyregex to replace all . with /, and use that output as a directory path.

It seemed like propertyregex would be the tool for this, but maybe I am using its regexp property incorrectly.

How would I use regex to find the . only, I don’t want to assume that the string is 3 alphabet portions separated by periods. also perhaps propertyregex is not the tool for the job

here is one that works where I assume that a package name only have 2 periods

<!-- set package name to folder directory -->
    <propertyregex 
        property="current.target.dir"
          input="com.element.subelement"
          regexp="(.+?)\.(.+?)\.(.+?)"
          replace="\1/\2/\3"
          casesensitive="false" />

    <echo>${current.target.dir}</echo>
  • 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-15T21:33:00+00:00Added an answer on June 15, 2026 at 9:33 pm

    Simply replacing \. with / should accomplish what you’re looking for, if I understand. However, this will only replace the first instance on a line by default, so you have to add the property global="true":

    <propertyregex 
        property="current.target.dir"
          input="com.element.subelement"
          regexp="\."
          replace="/"
          global="true" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a String with this content: href=http://www.website.com/ /> [...] [...] I just want
Assuming a string like http://domain.com/aaaa/bbb/ccc/ddd/ I want to use a .htaccess file to get
I have a json string like this: http://pastebin.com/ckUZadwL I'm trying to use gson to
I have this string: small: http://img.exent.com/free/frg/products/666550/player_boxshot.jpg boxshot: http://img.exent.com/free/frg/products/666550/boxshot.jpg I want to get only the
I have this string stored in a variable: IN=bla@some.com;john@home.com Now I would like to
I'm out of ideas! If I do this: string strTo = email1@domain.com; string strFrom
For example: string = This is a link http://www.google.com How could I extract 'http://www.google.com'
i have a string like this one $sitesinfo = 'site 1 titles-example1.com/ site 2
I have a url string like this: http://www.google.com/cse?cx=017840637368510444960:ny1lmky7r-0&client=google-csbe&output=xml_no_dtd&q=simon+g I need to send this url
I try to get string from this url: http://autoc.finance.yahoo.com/autoc?query=google&callback=YAHOO.Finance.SymbolSuggest.ssCallback When I look at 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.