Skip to content

my2cents

"The Earth was made round so that we would not see too far down the road" — Karen Blixen

  • PGP
  • Projects
    • jQuery highlight
    • iCalendarFactory
    • CopyMachine
  • Toad The Wet Sprocket
  • Goodies
  • About

Tag: regular expression

Regex for GSM 03.38 7bit character set

10th April, 2012 Marcel Stör4 Comments

If your application sends SMS you want to make sure that characters to be sent comply with GSM 03.38 (e.g. 7bit). If you need to validate (user) input for invalid characters you could do that pretty easily with regular expressions. For Java the following regex is ready to use. For other languages you can base […]

Read More…

Oracle regular expression aka regexp, issues with character class

22nd September, 200928th February, 2010 Marcel Stör1 Comment

In most programming languages the regular expression pattern to find the digit ‘1’ surrounded by ‘;’ and other digits would be something like

1
[;\d]*1[;\d]*

So, the pseudo character class “; or digit” is matched zero or more times, then the digit 1 is matched followed by zero or more “; or digit”s. A few examples: […]

Read More…

Regex: match last occurrence

8th June, 200712th December, 2010 Marcel Stör1 Comment

Today, I found myself looking for a regular expression that matches only the last occurrence of a given expression. As I’m still not a regex mastermind I couldn’t come up with it just like that. The key to the solution is a so called “negative lookahead“. A lookahead doesn’t consume characters in the string, but […]

Read More…

Tags

Africa Apache Apple battery CSS Devoxx Devoxx 2011 Devoxx 2012 Docker dolphin Eclipse environment ESP8266 Espressif Git Hibernate IoT iPhone iTunes Java JavaScript JBoss JPA LoRaWAN Maven MAX7219 music Namibia networking NodeMCU Oracle OS X Palmwag PHP printer Purros Python regexp regular expression Spring Spring Security SSL Thunderbird WebSphere WeMos

Categories

  • Apple & Mac (44)
  • Blogroll (1)
  • Computers (30)
  • General (43)
  • IoT (24)
  • Jazoon (3)
  • Life (27)
  • Software Development (76)
    • Java (47)
    • JavaScript (2)
    • Ruby (1)
  • Sun SPOT (3)
  • Travelling (40)
    • Japan 2007 (2)
    • Japan 2008 (7)
    • Namibia 2009 (12)
    • North America 2006 (18)
  • Uncategorized (7)
  • Web Authoring (23)