Jump to content
UBot Underground

Regex To Get Words Between 2 Dashes


Recommended Posts

Hi guys

 

 

I am trying to grab just the weekday in this case Thursday for 

 

C:\\Users\Rawcus\Desktop\couldbeanythingtext_1234-Thursday-1537.png

 

It will always have a - in front and behind 

 

ie -Thursday-

 

 

It will always have a file path as well and some text before containing possibly numbers and an underscore 

 

can anyone help 

 

 

Thanks in advance 

Link to post
Share on other sites

Thanks guys thats helped lots

 

am stuck on 

 

getting the first 2 digits from a 4 digit number 

 

ie 1359

 

I want 13 

 

 

I can grab all the number just not the first 2, I know I need a {2} to grab only 2 I just can't do it! 

 

 

(^\d+)  

Link to post
Share on other sites
Well you haven't mentioned anything else about the line the digits are on..are you saying this doesn't work?
 

 

 

I need a {2} to grab only 2 I just can't do it! 

 

 
alert($find regular expression(1359,"^(\\d\{2,2\})"))
 
 
 
alert($find regular expression(1359,"^\\d\\d"))
 
 
 this works too!  :)
 
or 
 
alert($find regular expression(1359,"^[0-9][0-9]"))     :)  
 
 
Again , like I said we need to know the placement of the digits in a line - if this doesn't work.
  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...