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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:49:36+00:00 2026-06-11T02:49:36+00:00

I need to manipulate a link href which looks like this: /agents/view/model:Member/ag_start_dateMonth:08/ag_start_dateYear:2012/ag_end_dateMonth:08/ag_end_dateYear:2012 I need

  • 0

I need to manipulate a link href which looks like this:

/agents/view/model:Member/ag_start_dateMonth:08/ag_start_dateYear:2012/ag_end_dateMonth:08/ag_end_dateYear:2012

I need to catch the part: ag_start_dateMonth and replace the value 08 with a value the user selected through a form.

That means, that I need to find where in the string is this pattern ag_start_dateMonth and to find the value just after the : and before the next / and to replace it with a new value given by the user through form select option.

How can I do this?
Please advice, I am quite unsure about regex syntax :-/

  • 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-11T02:49:38+00:00Added an answer on June 11, 2026 at 2:49 am

    If this input come from a form on the page, you can always “Rebuild” the href instead of search and replace. Say you have a form you were getting these values from on the page, with jQuery this would be trivial with something like

    jQuery('#id-of-form button').click( function () {
        var start_month = jQuery('#id-of-form select.start-month').val();
        var start_year = jQuery('#id-of-form select.start-year').val();
        var end_month = jQuery('#id-of-form select.end-month').val();
        var end_year = jQuery('#id-of-form select.end-year').val();
        jQuery(a#your-link-id).attr('href','/agents/view/model:Member/ag_start_dateMonth:' +
             start_month + '/ag_startdateYear:' + start_year + "/ag_end_dateMonth:" +
             end_month + '/ag_end_dateYear:' + end_year);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF app in which I need to programatically manipulate at runtime.
I need to write an app which can observe and manipulate the positions of
Need to apply a filter to a file like this: TUPAC_0006:1:1:2554:2356#0/1 0 * 0
I need manipulate left and right key on prototype, something like http://mangastream.com/
I'm implementing an algorithm in which I need manipulate a mesh, adding and deleting
I need to manipulate a XML string. The string is this one : <div
I'm using AJAX to receive an XML response, which I then need to manipulate.
This is an example of the text that I need to manipulate: YEAR (space)
I need to manipulate a large amount of numerical/textual data, say total of 10
I need to manipulate large strings in Java (deleting and adding the deleted chars

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.