Testing a regular expression at regex101.com successfully matches, but fails in my KM macro actions.
\X - "Matches any valid Unicode sequence, including line breaks" (Shown in screen shot)
or
[[:ascii:]] - "Any basic latin character. é is not one of them. (Not shown, but also successful at regex101)
Thanks for your response. However, my intention wasn't to have anyone troubleshoot the macro, but simply to answer the question of whether there was a known equivalent or comparable regular expression token to \X or [[:ascii:]] in KM regular expressions which doesn't yield the same result as at regex101. I provided the macro statements and regex101 image for the context or case of how I've used them at regex101 without sharing my airline itinerary.
Test data and a test macro. I was unable to attach a pdf to convert to text.
Departing 10/9/18 Tuesday
-These Metacharacters offer some powerful solutions to long-standing RegEx problems. These can replace complicated RegEx patterns previously required, and are recommended for use if you are running the required versions. For example, \h and \R. ICU 55 is not available in all RegEx engines. A notable exception is JavaScript (and JXA), even in High Sierra. So if you are using the native Keyboard Maestro Actions that use RegEx, it would be available, but not necessarily in Actions that use Execute Script in another language. It is available in Execute AppleScript Actions that use ASObjC RegEx.
Returning 10/11/18 Thursday
According to regex101.com, \X matches “any number of Unicode characters that form an extended Unicode sequence”. And according to regular-expressions.info Which would seem to indicate that a single \X would match a multi-code point single unicode character (eg an emoji).
On regex101.com this does not appear to be the case (eg match (\X\X\X).* against “” and it returns a match of “”. So basically, \X appears to be equivalent to “.” in single-line mode (eg: (?s:.)).
On the other hand, icucore (and hence Keyboard Maestro) does support \X, and so for Keyboard Maestro, the above pattern (\X\X\X).* correctly matches “”.
Thank you very much for answering my question and providing instructional information!
It turns out I was not getting the same capture as at regex101 because the pdftotext egrep action using the \X or [[:ascii:]] was not providing the same text to the KM search using regular expression action in the macro as at regex101. The value of using the \X or [[:ascii:]] tokens was to skip text between the occurrences of the targeted or desired text and I mistakenly interpreted it to not have the same impact in the KM action.