Jump to content

Please read the Forum Rules before posting.

Photo
- - - - -

help in regular expression


2 replies to this topic

#1 david psalms

david psalms

    Resource Builder

  • Moderators
  • 984 posts
  • LocationAndhra Pradesh, India
Offline

Posted 27 March 2018 - 11:12 PM

Hi,

 

I have written regular expression to find verse references.

 

[0-9A-z]{3}_[0-9]{1,3}:[0-9]{1,3}   --- this was able to find verses without range like 

Neh_13:7 Eze_16:3 Eze_16:44 Hos_7:8 Mal_2:11 1Co_7:14

 

[0-9A-z]{3}_[0-9]{1,3}:[0-9]{1,3}?[0-9]{1,3} -- this was able to find verses with range like 

 Ezr_10:18-44  Neh_13:1-3   Num_25:1-3 

 

but i can not combine them into one to find both the verses with range and without range.

 

can you help me combine both into one.

 

thanks

david

 

 


The first goal in life is to make ourselves acceptable to the LORD


#2 JPG

JPG

    Jon.

  • Moderators
  • 1,675 posts
Online

Posted 28 March 2018 - 12:11 AM

ms word regex is not greedy so you can use this

 

 

[0-9A-z]{3}_[0-9]{1,3}:[0-9-]{1,7}



#3 david psalms

david psalms

    Resource Builder

  • Moderators
  • 984 posts
  • LocationAndhra Pradesh, India
Offline

Posted 28 March 2018 - 08:37 AM

Thank you very much bro. its working. 


The first goal in life is to make ourselves acceptable to the LORD




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs