|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sed question?
I have what should be a simple problem. I can grep out a line from a file that looks like...
<password information="wiuihm@kj*"/> I want to capture the data between the ". The problem is that the data can be surrounded with single or double quotes. I think I can get it working with "cut", but not with variable delimiters. Any ideas? Maybe sed? |
|
#2
|
||||
|
||||
|
sed is more for replacement really, but here's the regexp you'd be looking for
/("|').+("|')/
__________________
~James [Not currently seeking freelance work] Like philosophy or interested in spirituality? Philosophorum. Game Dev Experts Forums Foresight Linux - Because your desktop should be cool! Linux FAQ FedoraFAQ UbuntuGuide |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Sed question? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|