I am trying to extract everything from a text file between the braces and write the output in the other text file. I was able to create a regular expression to match everything between {} and it works fine (I wrote a simple Java program to test it), but I am not very strong in Unix so Unix is not sure about using this regular expression. > > P> I have lowered the following command Tried, I'm getting the following error. between me to match everything between [] Regex got it and it works great is not sure where I'm going wrong Can anyone issue me my Rejox? You have to avoid + quantifier \ {([^}] +) \}
Cat Sample File | Sed -e s /.* \ {\ [[^}] + \) \}. * / / 1 / g '
sed: -e expression # 1, four 24: invalid predecessor regular expression
cat file | Sed -e 's /.* \ [\ [[^]] * \) \]. >
No comments:
Post a Comment