Reply to post

Bible Reference e.g. Luke 1.68-79

Author
Big John
User
  • Total Posts : 0
  • Reward points: 0
  • Joined: 2018/01/15 05:55:59
  • Location: Lancaster, UK
  • Status: offline
2018/01/19 18:19:20 (permalink)

Bible Reference e.g. Luke 1.68-79

I have Bible References in the format Luke 1.68-79
In order to have this read correctly I have set up a Regular Expression (RegEx)
Pattern:
(\d+)\s*.\s*(\d+)-\s*(\d+)
Replace:
$1 $2 to $3
Test:Original
Luke 1.68-79
gives:
Test:Replacement
Luke 1 68 to 79 
which sounds fine.
 
However, playing it in the main text box, the voice says:
Luke 1 8 to 79
 
Is this a bug or could it be down to another RegEx I have set up?
 
A second RegEx Pattern is (\d+)\s*.\s*(\d+) Replace $1 $2 
 
(I tried to post an image but the From Gallery / Upload tab says only "Select from an option below:" with no options below.)

1 Reply Related Threads

    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Bible Reference e.g. Luke 1.68-79 2018/01/20 09:37:12 (permalink)
    Hello John,
    Please modify your RegEx expressions, as the dot (and maybe -) havs special meaning in RegEx, if not "quoted" with \
     
    (\d+)\s*\.\s*(\d+)\-\s*(\d+)
     
    and your second pattern:
     
    (\d+)\s*\.\s*(\d+)
     
    Otherwise the dot in the 2nd pattern actually matches any character (6 in your example) and removes it. I tested my small modification, both work and spoke as you wanted.
    Jump to:
    © 2024 APG vNext Commercial Version 5.1