jnfuller.freeshell.org - The home page of Josh Fuller
   


The homepage of Josh Fuller.


Categories

 ·dance
 ·film
 ·als
 ·markus
 ·music
 ·tsfwon
  ·hardware
  ·networks
  ·software
 ·linux
  ·debian
  ·TELUS
  ·voip
   ·regex
 ·unix
  ·bsd
 ·xnu


2008
Months
Sep
Oct Nov Dec

Josh Fuller
jnfuller at gmail dot com

Subscribe

Subscribe to a syndicated feed of my weblog
       

index / technology / telecommunications / voip / regex

Sat, 12 Apr 2008

lookaround to cut trailing digits out of a phone number

If you have a sip:+15558675309123@foo.bar number and you need to cut out some digits out of the +15558675309123 once you've parsed it out regex lookaround can be your best friend.

Try using ^(\+.*)(?=...$) in your parser and you will instantly find your needed results of +15558675309 are available.

email: Josh Fuller | tag: /technology/telecommunications/voip/regex | permanent link | Share on Facebook