Regular expression for uppercasing not working
Copy link to clipboard
Copied
Dear all!
I have no success in changing the case of found items with Find/Replace using Regular expression in FrameMaker 14.0.3.500.
I want change lower case characters after n-dash followed by blank b< the upper case equivalent:
Assume no change in maker.ini, hence RegularExpressionSyntax=Perl
Find: – ([a-z])
Replace: – \U$1 or – \u$1 or – \p{Lu}$1
Consider case: on or off
=> None of the replacements does the job!
Then I have tried various things with RegularExpressionSyntax=egrep or grep.
No success either.
My syntax reference is Replacement Strings Reference: Context and Case Conversion
Bug? Wrong syntax?
Klaus Daube
Copy link to clipboard
Copied
Klaus,
It looks as if FrameMaker is not working correctly with escape sequences in the Replace field. For example, the normal $1 for the first capturing group works while the alternative \1 does not.
This means that the example in the FM help document does not work either...
I think this must be a bug.
Ian
Copy link to clipboard
Copied
Hi Klaus,
I just have the same problem with FM 2019.0.2.
Did you already find a way around this?
Or did you enter this in the Adobe Bug Tracker so that I can vote for this issue?
Best regards
Winfried
Copy link to clipboard
Copied
Unfortuantely FM does not support regex in the Replace field! We have complained a lot about this, but yet now there is no light in the tunnel.
Copy link to clipboard
Copied
Some things are supported.
E.g. to replace regular spaces with non-breaking spaces before units.
Search (\d) mm
Replace with $1\ mm
With the $ notation you can also search and replace several groups.
But yes, there are a few regular expression features which do not work yet.
Copy link to clipboard
Copied
Just wondering: Is there a reliable reference describing what is and is not supported in FM regex replaces?
For that matter, is there a library anywhere of tested and verified FM regex search/replace pairs? Or do regex newbies like me just have to roll our own?
Copy link to clipboard
Copied
There is a quite comprehensive post on the Adobe TechComm blog here: [Guest Post] “Do the magic: Regular Expressions in FrameMaker”, by Marek Pawelec – Adobe TechComm Bl...
Copy link to clipboard
Copied
Pitty. Still not working (FM 16.0.2.916).
I created a bug report in the Adobe Tracker, if someone wants to vote for this issue:
https://tracker.adobe.com/#/view/FRMAKER-10768

