Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
any regex pros here?
#2
In other words, you want to strip out everything from the beginning of the line through the '::' (if it exists) and output the remainder of the line.

sed -E 's/^.*:://'

will do this. In the Terminal, try:

$ (echo Location ; echo Inspections_Selected::Inspector) | sed -E 's/^.*:://'
Location
Inspector
$
Reply


Messages In This Thread
any regex pros here? - by wolfcry911 - 10-17-2008, 09:11 PM
Re: any regex pros here? - by TheCaber - 10-17-2008, 09:52 PM
Re: any regex pros here? - by wolfcry911 - 10-17-2008, 09:59 PM
Re: any regex pros here? - by Seacrest - 10-17-2008, 09:59 PM
Re: any regex pros here? - by wolfcry911 - 10-17-2008, 10:06 PM
Re: any regex pros here? - by wolfcry911 - 10-18-2008, 12:23 AM
Re: any regex pros here? - by TheCaber - 10-18-2008, 01:41 AM
Re: any regex pros here? - by TheCaber - 10-18-2008, 02:13 AM
Re: any regex pros here? - by wolfcry911 - 10-18-2008, 01:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)