Created
December 31, 2013 16:28
-
-
Save anonymous/8199165 to your computer and use it in GitHub Desktop.
In attempts to get my string search to be case insensitive i have found a method of translating the text to all lowercase. My problem is i seem to make the translate statement play well with my string search xpath statement, any ideas?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#translate | |
translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') | |
#string search | |
'//text()[preceding::*[contains(text(),"Monday")] and following::*[contains(text(),"Tuesday")]]' |
did you try
'//text()[preceding::*[contains(translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),"monday")] and following::*[contains(translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),"tuesday")]]'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you provide a sample document? or a snippet that should match at least