Search the Community
Showing results for tags 'afb-4985'.
-
If I use the regular expression .+ coupled with a specific style, the results appear, but selecting them does not move the selection to the found text. If I repeat the same search coupled with any other style, it will work as expected. If I use defined query (even if it contains .) coupled with the problematic style, it will work as expected.
-
Here is a demonstration of a find/replace issue with a certain regex patterns in combination with character styles. For this recipe, I have provided the attached sample file so you can download and get right to testing. Set your FaR studio to accept regular expressions. Enter the simple pattern .+ into the Find field. Also set the Find field to search for the Character Style Strong. (I have left the replace field empty). Click the Find button a few times. Expected: Typically, clicking Find will highlight the match in the document, multiple clicks on the Find button will cycle through the results, and you can click on a result in the FaR Studio to highlight that match in the document. None of those things happen in the test above. All of those things do happen if you search for either the regex pattern or the character style, but not both together. In testing, it seems quantifiers on the . (any single character) within a pattern will cause the same issue. For example: /.{1,}/ and /.*/ also fail. I have tested on macOS 11.5.2 with Publisher 1.10.1 and beta Publisher 1.10.2.1167. (For the curious, yes, the above search is redundant, but it is cut down for the example. I was actually searching for /(\l)(.+)/ to replace with /\U$1$2/. I was wanting to capitalize the first letter of each match of a particular character style.) regex test.afpub