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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:40:42+00:00 2026-05-21T23:40:42+00:00

I came across Datejs recently and found it very useful. However I could not

  • 0

I came across Datejs recently and found it very useful. However I could not figure out if there is a way to parse a string and extract only date part from it using the same.

For example, if there is a string >> “I will start exercise from next Monday.”

Then it should parse the string, extract ‘next monday’ from it and convert it into date and give me the result.

How can it be implemented?

Thanks 🙂

  • 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-05-21T23:40:43+00:00Added an answer on May 21, 2026 at 11:40 pm

    You can write some RegEx for that. That would be the easiest way. ‘next’ will be a keyword in that case. A simple function can lookup the current weekday and return the date of the next monday. Should not that complicated.

    Edit:

    You can do something like this:

    var pattern = /^([\w\W.]*)(next){1}([\sa-zA-Z]*)/;
    while (result = pattern.exec(yourTextVariable) != null){
       // read the data as you need from the result array
    }
    

    The Pattern above expecting a white space then the keyword next and will red the next word if it only has alpha-letters. (please note that the RegEx is untested and may need some refactoring to fit your needs. You may take a look at this page to do this: javascriptkit.com)

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

Sidebar

Related Questions

I came across this kind of situation but could not resolve, any hint would
I came across this program and its not behaving in expected way. public class
Came across a problem which google searches could not help me with. I have
Came across something like this today, and was wondering if there was an equivalent
I came across this recently, up until now I have been happily overriding the
I came across this syntax which i have not seen before struct A {
I came across this code today and don't really understand it. Please could someone
Came across this error when trying out the ruby on rails tutorial section with
Came across code recently in Wicket like so: Form<?> form = new Form<Void>(form) Can
I came across a weird behavior but I am not sure if I am

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.