troubleshooting Question

expand a regex for grep

Avatar of ugeb
ugebFlag for United States of America asked on
Unix OSShell ScriptingRegular Expressions
5 Comments1 Solution518 ViewsLast Modified:

I have the following regex I'm using in grep:

'.text[ ]*=[ ]*"[^"]*";'

I want to expand what's to the right of the '='.  Currently it looks for a single string.  However, I also want to find lines that have multiple strings concatenated with objects and other strings.  For example I want the following lines to be included:

myobject.text =myfirstNumber+" is over the limit, which is " +mylimit +"!";

I think the simplest thing to say is it can have anything to the right of the '=' as long as it has at least one string and a ';' at the end


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros