Skip to main content
Update based on comments
Source Link
Suba Thomas
  • 9k
  • 1
  • 19
  • 33
Grid[MapAt[StringReplace[#, (l_ ~~ u_) /; UpperCaseQ[u] && LowerCaseQ[l] :> l <> "\n" <> u] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description hereenter image description here

Update

Based on comments, I think you can start defining a set such as

committees = {"Agriculture", "Appropriations", "Armed Services", "Budget", "Climate Change", "Education and Labor", "Ethics", "Energy and Commerce", "Financial Services", "Foreign Affairs", "Homeland Security", "Intelligence", "Judiciary", "Modernization of Congress", "Natural Resources", "Oversight and Reform", "Science, Space, and Technology", "Small Business", "Transportation and Infrastructure", "Veterans' Affairs", "Ways and Means", "Small Business", "Science, \nSpace, and Technology" -> "Science, Space, and Technology", "Small \nBusiness" -> "Small Business", "Veterans' \nAffairs" -> "Veterans' Affairs", "Energy and \nCommerce" -> "Energy and Commerce", "Intelligence" -> "Permanent Select Committee on Intelligence"}; 

and then use that as follows

Grid[MapAt[StringRiffle[StringCases[#, committees], "\n"] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

Grid[MapAt[StringReplace[#, (l_ ~~ u_) /; UpperCaseQ[u] && LowerCaseQ[l] :> l <> "\n" <> u] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

Grid[MapAt[StringReplace[#, (l_ ~~ u_) /; UpperCaseQ[u] && LowerCaseQ[l] :> l <> "\n" <> u] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

Update

Based on comments, I think you can start defining a set such as

committees = {"Agriculture", "Appropriations", "Armed Services", "Budget", "Climate Change", "Education and Labor", "Ethics", "Energy and Commerce", "Financial Services", "Foreign Affairs", "Homeland Security", "Intelligence", "Judiciary", "Modernization of Congress", "Natural Resources", "Oversight and Reform", "Science, Space, and Technology", "Small Business", "Transportation and Infrastructure", "Veterans' Affairs", "Ways and Means", "Small Business", "Science, \nSpace, and Technology" -> "Science, Space, and Technology", "Small \nBusiness" -> "Small Business", "Veterans' \nAffairs" -> "Veterans' Affairs", "Energy and \nCommerce" -> "Energy and Commerce", "Intelligence" -> "Permanent Select Committee on Intelligence"}; 

and then use that as follows

Grid[MapAt[StringRiffle[StringCases[#, committees], "\n"] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

deleted 10 characters in body
Source Link
Suba Thomas
  • 9k
  • 1
  • 19
  • 33
Grid[MapAt[Identity@@StringReplace[#Grid[MapAt[StringReplace[#, (m__ ~~ l_ ~~ u_ ~~ r__) /; UpperCaseQ[u] && LowerCaseQ[l] :> m <> l <> "\n" <> u <> r]u] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

Grid[MapAt[Identity@@StringReplace[#, (m__ ~~ l_ ~~ u_ ~~ r__) /; UpperCaseQ[u] && LowerCaseQ[l] :> m <> l <> "\n" <> u <> r] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

Grid[MapAt[StringReplace[#, (l_ ~~ u_) /; UpperCaseQ[u] && LowerCaseQ[l] :> l <> "\n" <> u] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here

Source Link
Suba Thomas
  • 9k
  • 1
  • 19
  • 33

Grid[MapAt[Identity@@StringReplace[#, (m__ ~~ l_ ~~ u_ ~~ r__) /; UpperCaseQ[u] && LowerCaseQ[l] :> m <> l <> "\n" <> u <> r] &, table21, {All, 3}], Frame -> All, Alignment -> Left, Background -> {None, {{LightOrange, White}}}] 

enter image description here