Samuel Liew’s Blog

News, events, and other interesting finds

As I am involved in the visuals ministry in church, I usually have to check through the lyrics of each song before service for consistency. This is tedious work as there are many songs, and have to repeatedly do the same validation each week. As any knowledgeable IT geek would do, I wrote a UltraEdit macro to automate the task using Regular Expressions to find and replace stuff.

Currently this script does the following:

  • Correct all words to proper capitalization
    - Capitalize first word of every line
    - Capitalize any word that refers to God. E.g.: Jesus, Lord, Holy Spirit, Father
  • Standardize words/punctuation
    - Replace angled quotation marks (“) to standard (")
    - Replace tabs with a space
    - Replace words like “O” to “Oh”
    - Captalize labels and add buffer lines before each (Chorus, Verse, Bridge, etc.)
  • Removes unnecessary stuff
    - Lines with song chords, if any
    - Multiple spaces
    - Trailing spaces
    - Multiple blank lines
    - Certain punctuations

Example song (before running the macro):

2. Tell the world Verse 1: F#m Don't want to stand here and shout your praise, F#m And walk away and forget your name. F#m I stand for you if that's all all i do, F#m 'Cause there is none that compares to you. Pre Chorus: F#m F#m 'Cause all i want in this life is you. F#m And all i want in this whole world is you, you, you. Chorus: Bm7 D A E Tell the world that jesus lives. F#m D Tell the world that. tell the world that. A E Tell the world that he died for them. F#m D Tell the world that he lives again. Verse 2: F#m No longer i, But christ in me. F#m 'Cause it's the truth that set me free. F#m F#m How could this world be a better place, by Thy mercy, and by Thy grace. Bridge: A Bm9 F#m D Come on, Come on, we'll tell the world about you. A Bm9 F#m D Come on, Come on, we'll tell the world about you.

Example song (after running the macro):

Tell the world Verse 1 Don't want to stand here and shout Your praise, And walk away and forget Your name. I stand for You if that's all all I do, 'Cause there is none that compares to You. Pre-Chorus 'Cause all I want in this life is You. And all I want in this whole world is You, You, You. Chorus Tell the world that Jesus lives. Tell the world that. tell the world that. Tell the world that He died for them. Tell the world that He lives again. Verse 2 No longer I, but Christ in me. 'Cause it's the truth that set me free. How could this world be a better place, by thy mercy, and by thy grace. Bridge Come on, come on, we'll tell the world about You. Come on, come on, we'll tell the world about You.

Here’s the macro code:

InsertMode ColumnModeOff HexOff PerlReOn TrimTrailingSpaces Top Find RegExp "^[ ]+" Replace All "" Find RegExp "^\s*(([A-G][\/ A-G a-z 0-9 #]{0,5})\s+)+\s*$" Replace All "" Find RegExp "^[0-9]+[\. \: \)]?\s*" Replace All "" Find RegExp "^(Key|key|KEY)[\. \: \)]?\s*[A-G a-g].*" Replace All "" Top Loop SelectLine ToLower SelectWord ToCaps Key END Key RIGHT ARROW IfEof ExitLoop EndIf EndLoop Top Find RegExp "\b(you)\b" Replace All "You" Find RegExp "\b(you've)\b" Replace All "You've" Find RegExp "\b(you're)\b" Replace All "You're" Find RegExp "\b(your)\b" Replace All "Your" Find RegExp "\b(yours)\b" Replace All "Yours" Find RegExp "\b(christ)\b" Replace All "Christ" Find RegExp "\b(father)\b" Replace All "Father" Find RegExp "\b(god)\b" Replace All "God" Find RegExp "\b(almighty)\b" Replace All "Almighty" Find RegExp "\b(son)\b" Replace All "Son" Find RegExp "\b(he)\b" Replace All "He" Find RegExp "\b(he's)\b" Replace All "He's" Find RegExp "\b(his)\b" Replace All "His" Find RegExp "\b(him)\b" Replace All "Him" Find RegExp "\b(himself)\b" Replace All "Himself" Find RegExp "\b(holy ghost)\b" Replace All "Holy Ghost" Find RegExp "\b(i)\b" Replace All "I" Find RegExp "\b(jehovah)\b" Replace All "Jehovah" Find RegExp "\b(jesus)\b" Replace All "Jesus" Find RegExp "\b(saviour|savior)\b" Replace All "Saviour" Find RegExp "\b(holy spirit)\b" Replace All "Holy Spirit" Find RegExp "\b(holy one)\b" Replace All "Holy One" Find RegExp "\b(spirit)\b" Replace All "Spirit" Find RegExp "\b(lord)\b" Replace All "Lord" Find "Lords" Replace All "lords" Find RegExp "\b(king)\b" Replace All "King" Find "Kings" Replace All "kings" Find RegExp "\b(Word)\b" Replace All "word" Find "prince of peace" Replace All "Prince of Peace" Find "my redeemer" Replace All "my Redeemer" Find "Kingdom" Replace All "kingdom" Find "your majesty" Replace All "Your Majesty" Find "my Spirit" Replace All "my spirit" Find RegExp "\b(o|oh)\b" Replace All "Oh" Find RegExp "\s*\b(((^(P|p)re)(C|c)horus)|((^PRE)CHORUS))\b" Replace All "\n\nChorus" Find RegExp "\s*\b((P|p)re([ ]|-)?chorus|PRE([ ]|-)?CHORUS)\b" Replace All "\n\nPre-Chorus" Find RegExp "\s*\b((P|p)re|PRE)\b" Replace All "\n\nPre" Find RegExp "\s*\b((C|c)oda|CODA)\b" Replace All "\n\nTag" Find RegExp "\s*\b((V|v)erse|VERSE)\b" Replace All "\n\nVerse" Find RegExp "\s*\b((B|b)ridge|BRIDGE)\b" Replace All "\n\nBridge" Find RegExp "\s*\b((I|i)ntro|INTRO)\b" Replace All "\n\nIntro" Find RegExp "\n\nIntro(.)*\n\n" Replace All "\n\n" Find RegExp "\s*\b((E|e)nd(ing)?|END(ING)?)\b" Replace All "\n\nEnding" Find ":" Replace All "" Find "’" Replace All "'" Find "‘" Replace All "'" Find "“" Replace All """ Find "”" Replace All """ Find "[" Replace All "" Find "]" Replace All "" Find " " Replace All " " Find " " Replace All " " Find " " Replace All " " Find "'S" Replace All "'s" Find "'R" Replace All "'r" Find "'V" Replace All "'v" Find RegExp "^'c" Replace All "'C" Find RegExp "(\r\n){3,}" Replace All "\r\n" SelectAll Copy

Download The Macro (requires UltraEdit)

Today I went to Ps. Benny’s church. Thankful that I got a lift from cell-leader. I could connect with the worship and sermon from Ps. Benny. Went for lunch as a cell at some ‘hawker center’-style place.

Went to cell members’ (Michelle and Siaw Tze)’s house for housewarming dinner just now. Got to interact a bit more there.

Yesterday afternoon I managed to install Ubuntu (Linux) onto my laptop as a secondary boot option. It was cool and I spent quite a while tweaking the new OS.

In the evening I went to a cell group in Faith Community Church. The group had about 10 people. My ex-BB senior was there too. We had some worship and ice-breakers.

Today I cycled to the shopping mall about 4.5km away to have lunch and see what stuff/groceries I need. It took me about 20mins to get there. I didn’t get anything in the end and just did window shopping. I realized I had a tyre puncture when I was on the way back. I inspected the rear wheel and found that the cause was a sharp thorn. Was a bit disappointed with myself. Tried riding the bicycle back but had to pump the wheel every 500meters. In the end I pushed the bike for the last 1km.

This evening my co-tenant invited me to cell group. It was quite big for a cell group at about 50 people. Dinner was pot-luck, which turned out to be a huge spread. When the meeting started, I got my first culture shock – when somebody is speaking, after every phrase everyone said ‘amen’, like it was punctuation, during singspiration/prayer. They even repeated the song/hymn excessively like about 8 times, both fast and slow, then read out line by line a few times, and in the end only sang a total of one song which took 15-20 minutes. Oh yea, they also are still singing hymns from a hymn book; I scanned through and didn’t see many that I know. Then during prayer, people took turns to pray, and everyone helps ‘punctuate’ the phrases with ‘amen’, even though some of the phrases doesn’t need it. It’s not that I’m against saying ‘amen’ to confirm with another person’s prayer, but it is so unnecessary and super excessive the way they use that word.

However, they broke up into several smaller groups, and that was when things turned out better. Everyone took turns to read the lesson from the handouts. It was about group dynamics and why prayer meetings are important. Not everyone was fluent in English. I learned that prayer is necessary as an individual, but prayer meetings are meant to be a more powerful platform in which the church can gather to pray for things that are too big for one person to be responsible for, so that the church can move forward together in unity and in God’s will.

This week my family returned from the U.S. at 12am on Sunday, 8th June. A few relatives and church friends went to meet them at the airport, and Uncle Kin Wah/Aunty Lois kindly gave me a lift. I was so excited to see my family again after two years, and had lots to catch up with together.

I stayed over at Uncle Kin Wah’s house and followed them to church camp the same morning. We reached the resort early and as the rooms wasn’t ready yet, went to have lunch/shopping before dinner.

This camp was really fun and exciting, although the meals were mediocre during the first few days. The best parts of the camp was that the camp speaker spoke about our destiny and how we can know and claim it, and that I spent time fellowshipping with my friends :)  .

Camp photos can be found at the following links:
HMC offical photos: kodakgallery
My Facebook Albums (add me on facebook to view) – Church Camp #1, Church Camp #2

After the church camp, the next major event is that the ‘U Connect’ life group held its first gathering. We had a time of praise & worship, sharing, and ice breakers. The parents provided lunch after that too.

In the evening, my family went for my cousin’s wedding dinner at holiday inn parkview. It was unexpectedly good, and me and my sis took lots of photos.

Right now I’m kinda at a crossroads in my life, where I need to make an important decision on what is my next course of study or work, which will affect my future. Please pray for me, that God will open a way and provide for my needs so that I may ‘walk’ in the plan and destiny that He has for my life.

I finally bought a rubik’s cube on wednesday, so that I can learn something new in my free time. Now I’m able to complete it on average about 5 minutes. I set my record of 2:45 on Thursday.

On Saturday, I went early to SIR building to renew my passport but they told me have to make biometric one because mine has exceeded 10 years already, so I did the application and took the photograph there.

After that I went to change the dehumidifiers and collect letters from my house (the one rented out). Unfortunately when I was leaving I accidentally locked my bunch of keys in the storage room, so I had to go to my grandmother’s house to get my aunt’s house spare keys, then go home (aunt’s place) get my house spare keys, then go back and reopen the storage room. I then collected the letters and went home, returning the spare keys to my grandmother on the way.

By then it was about 2pm. I started to scan the letters into the computer to send to my parents. There were a lot of letters, so I skipped the unimportant ones like newsletters and event invitations. I also received a wedding invitation from Aaron (Tung Ling guy) for 1st May. I’m still thinking whether to attend it.

I left home again about 3:45pm to go early to church service because I was on duty. There was a missionary who wanted to give a powerpoint presentation on the missions. The powerpoint crashed about halfway during the presentation as the powerpoint file was too large (it had a video playing and background music and lots of pictures), so when the computer ran out of memory it naturally crashed.

I registered and paid ($210) for the church camp after the service. I will be triple-sharing with Azaac and Belvin. Dinner was also provided as it was on the last Sat of the month. I gave Azaac his birthday present – a Rubik’s cube! I like the way he smiled when I gave it to him =)

An update on the shifting: Everything (ok, almost) has been shifted over, and renovations are supposed to have been completed, but apparently the contractor didn’t submit any plans to HDB for approval, so when the inspector came to check on the renovations, it wasn’t approved and so the renovations have been extended to make adjustments. The whole place is messy and dusty.

I have just finished shifting house 2 weekends ago, but there are still some construction work going on. My aunty just bought a new 36″ LCD TV and new set of sofa for the living room. I have posted pictures of the layout of the house in my facebook, taken while the construction work was still going on.

I’m looking forward to this year’s church camp from 8-12 June as I missed the last two ones due to school. My family will be returning on the 8th early morning before I leave for the camp.

The last few weeks was quite relaxed in camp, nothing much to do except sit in the office and do whatever I want as there were no trainings.