RegEx all upper case Eng to lower case Eng

4,662 views
Skip to first unread message

Jonathan

unread,
Nov 18, 2013, 12:23:56 PM11/18/13
to flex...@googlegroups.com
Does anyone have the knowledge of how to find Upper case words in glosses for example and change them to lower case?  I have tried multiple things to no avail.  \U does not find upper case. 

J V C

unread,
Nov 18, 2013, 3:44:26 PM11/18/13
to flex...@googlegroups.com
For basic ASCII characters, if you check for [A-Z] and make sure
case-sensitive is checked, that should find them. But I don't know of
any regex way to then convert them to lowercase. So you'd then have to
manually replace "A" with "a", etc.
> --
> You are subscribed to the publicly accessible group "FLEx list".
> Only members can post but anyone can view messages on the website.
> ---
> You received this message because you are subscribed to the Google
> Groups "FLEx list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to flex-list+...@googlegroups.com.
> To post to this group, send email to flex...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/flex-list/0072e7a8-97ab-485c-a9cb-d95e73ba5e8d%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Kevin Penner

unread,
Nov 18, 2013, 4:11:22 PM11/18/13
to flex...@googlegroups.com
This regular expression works in my text program that supports regular expressions, but I don't know if it will work in FLEx:
Search: [A-Z]
Replace: \L&\E
\L = change to lowercase until \E
& = refers to the complete text of the match
\E = End case modification

Example input:
I'm Going to Change the Case of the UPPERcase Letters to LowerCase.
I'm Going to Do This Using REGULAR EXPRESSIONS in the TextWrangler Program.
Case Sensitive is Checked. Replace All.

Example output:
i'm going to change the case of the uppercase letters to lowercase.
i'm going to do this using regular expressions in the textwrangler program.
case sensitive is checked. replace all.

Be careful. This will change EVERY uppercase letter to lowercase.

Sources:
http://refcards.com/docs/trusketti/perl-regexp/perl-regexp-refcard-a4.pdf
http://vim.wikia.com/wiki/Changing_case_with_regular_expressions

Kevin
> To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/528A7C2A.5090701%40gmail.com.

J V C

unread,
Nov 18, 2013, 4:33:14 PM11/18/13
to flex...@googlegroups.com
That doesn't work for me (in FW8). I'm guessing that you're using
Perl-type regex whereas FLEx uses ICU. Note that you also need
parentheses to do the capture.

Here are the two ways I tried; neither worked in FLEx:

([A-Z])
\L$1\E

([A-Z])
\l$1

More info here:
http://www.regular-expressions.info/replacecase.html

Jon

Ronald Moe

unread,
Nov 19, 2013, 1:01:46 AM11/19/13
to flex...@googlegroups.com

Does it have to be a RegEx? I have a CC table that does changes all upper case to lower case. I have another that only changes the first letter of the field.

Ron Moe

 


--

Jonathan

unread,
Nov 19, 2013, 10:02:36 AM11/19/13
to flex...@googlegroups.com
It does not have to be anything but a process.  That CC table sounds doable. How could I get that?

Jonathan

unread,
Nov 19, 2013, 12:23:35 PM11/19/13
to flex...@googlegroups.com
I wrote my own.  see attached if anyone else desires to do the same.
CaptoLow.map

Bob Eaton

unread,
Nov 20, 2013, 8:56:25 AM11/20/13
to flex...@googlegroups.com

For that matter, you could have created (activated) the ICU transliterator “Any to Lower” if you’re going to run it in a process

 

 

 

From: flex...@googlegroups.com [mailto:flex...@googlegroups.com] On Behalf Of Jonathan


Sent: Tuesday, November 19, 2013 11:24 AM
To: flex...@googlegroups.com

--

You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.

Bob Eaton

unread,
Nov 20, 2013, 8:56:25 AM11/20/13
to flex...@googlegroups.com

Late to the show…

 

Here’s another, less verbose way:

 

pass(Unicode)

 

UniClass [uc] = (latin_capital_letter_a .. latin_capital_letter_z)

UniClass [lc] = (latin_small_letter_a .. latin_small_letter_z)

 

[uc] > [lc]

 

 

Bob

 

From: flex...@googlegroups.com [mailto:flex...@googlegroups.com] On Behalf Of Jonathan


Sent: Tuesday, November 19, 2013 11:24 AM
To: flex...@googlegroups.com

--

You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.

Kevin Penner

unread,
Nov 20, 2013, 9:37:16 AM11/20/13
to flex...@googlegroups.com
How do you do this? --Kevin

Bob Eaton

unread,
Nov 20, 2013, 9:53:55 AM11/20/13
to flex...@googlegroups.com

I don’t have FLex installed to give the exact details, but the rough steps are:

 

In bulk edit view, go to the Process tab

Click the button to add a new process

In the resulting dialog, see if you can add an ‘ICU Transliterator’ (you might need to click the “More” button)

 

In the configuration (3-4 tab) dialog for ICU Transliterators, click the ‘Setup’ tab

In the list of transliterators, click on ‘Any to Lower’.

 

Click ‘Apply’ or ‘OK’,

click OK at accept the name (and to make it permanent – I think they have to be permanent to be used in FLex)

and once you get back to FLex, choose that ‘converter’ to do the process for whichever field you want all the upper case characters reduced to lower case….

Jonathan

unread,
Nov 20, 2013, 10:03:25 AM11/20/13
to flex...@googlegroups.com
It will look like this. 

Kevin Penner

unread,
Nov 20, 2013, 10:15:38 AM11/20/13
to flex...@googlegroups.com
Thanks, Jonathan and Bob! --Kevin

Ronald Moe

unread,
Nov 21, 2013, 1:40:00 AM11/21/13
to flex...@googlegroups.com

This may be a bit late, but here are my CC tables (attached). The table FwUpperLowerAll.cc changes all upper case letters to lower case. The other two only change the initial letter and were a bit more tricky to write. All three have been tested and work correctly. The ones that change the initial letter are useful if you want to capitalize the first letter of a definition (or change it back).

Ron Moe

 


--

You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.

FwLowerUpper.cc
FwUpperLower.cc
FwUpperLowerAll.cc
Reply all
Reply to author
Forward
0 new messages