Custom Cleaner: Find hyphen (-) character and make the next character UPPER CASE

8 views
Skip to first unread message

B R Y N L S

unread,
Jan 27, 2024, 12:52:53 PMJan 27
to TextSoap
Hello. I need to create a cleaner which will look at each string, for each line, and if there is a hyphen character, the cleaner will capitalize the immediate next character, such as:

Mary-anne -> Mary-Anne

Any help will be appeciated!

Bryan

Mark Munz

unread,
Jan 27, 2024, 2:41:38 PMJan 27
to text...@googlegroups.com
Create a custom cleaner and use a Regex Find and Replace

image.png

This matches a word character (\w), hyphen (-), capturing them. Then it captures the next word character (\w)
The replace has the first captured match with $1, $u tells TextSoap to uppercase the remainder, which includes $2 (second word character)



--
You received this message because you are subscribed to the Google Groups "TextSoap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to textsoap+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/textsoap/c71f165d-69da-45da-b4b4-ed51c482d2d3n%40googlegroups.com.


--
Mark Munz
unmarked software
https://textsoap.com/

Reply all
Reply to author
Forward
0 new messages