Rob Lowe is praising his “St. Elmo’s Fire” co-star Demi Moore for coming forward with her much talked-about tell-all.

The actress recounted her struggles with substance abuse, as well as her troubled childhood and marriages in her new memoir “Inside Out.”

ASHTON KUTCHER, MILA KUNIS HIT DISNEYLAND AFTER DEMI MOORE MAKES SHOCKING ALLEGATIONS IN MEMOIR

Lowe, 55, appeared on “The View” Monday and revealed the 56-year-old “was the first person I ever knew who got sober.”

Rob Lowe and Demi Moore.

Rob Lowe and Demi Moore. (The LIFE Picture Collection via Getty Images)

“She was a huge inspiration to me,” the actor continued. “It was the ‘80s, we were all doing our thing. I just remember thinking, ‘If that girl can get sober, anybody can.' Everybody has that person in their life where they go, ‘That’s a great example.’ So it was very helpful.”

Lowe, who has been sober for 29 years, said he “loved rehab” because it gave him “answers that I didn’t have” about life.

“It was like going to school to learn how to live your life with tools that nobody ever taught me,” he explained. “Here’s one of the great ones I learned: Never compare your insides to someone else’s outsides. I spent a lot of time thinking, ‘Should I be doing this, should I be doing that?’ It changed my life. I have great empathy for people who can just do it themselves. I needed experts. It was great, it was fantastic.”

DEMI MOORE REVEALS 'INDECENT PROPOSAL' DIRECTOR DEMANDED SHE GAIN WEIGHT

Rob Lowe attends "Parks And Recreation" 10th anniversary reunion party on March 21, 2019 in Hollywood, Calif.

Rob Lowe attends "Parks And Recreation" 10th anniversary reunion party on March 21, 2019 in Hollywood, Calif. (Presley Ann/FilmMagic/Getty)

Moore’s big break came at age 19 with a role in the soap opera “General Hospital.”  Moore said she was in over her head and started using alcohol and later cocaine to cope with her fears. And like her parents, Moore suffered from blackouts.

“I don’t have an off switch,” recalled Moore. “I don’t have the thing that says, ‘This is enough.’”

Then in 1984, Moore earned the role of party girl Jules in the 1985 film “St. Elmo’s Fire.”

“I mean, I think the irony certainly was not lost on me,” said Moore.

November 16, 2014. Actress Demi Moore poses at the Santa Barbara International Film Festival 9th Annual Kirk Douglas Award for Excellence in Film in Santa Barbara, California.

November 16, 2014. Actress Demi Moore poses at the Santa Barbara International Film Festival 9th Annual Kirk Douglas Award for Excellence in Film in Santa Barbara, California. (Reuters)

ASHTON KUTCHER USES DEMI MOORE DRAMA TO DIRECT FANS TO A MESSAGE ABOUT IMPEACHING DONALD TRUMP

Moore said she easily identified with her character and that the film’s producer and director insisted that she go to rehab. Moore committed to sobriety and her pledge lasted “almost 20 years” until she reached her 40s, when she relapsed.

“[It was] a profound gift that they gave me,” she said, speaking about sobriety.

Moore wrote in her book that the collapse of her marriage to Ashton Kutcher impacted her mental and physical health. The couple divorced in 2013.

Ashton Kutcher and Demi Moore at the premiere of

Ashton Kutcher and Demi Moore at the premiere of "No Strings Attached" at the Regency Village Theatre in Los Angeles, Jan. 11, 2011. Moore alleged that Kutcher shamed her for her alcohol abuse during their marriage. (Reuters)

She broke her 20-year sobriety and began abusing Vicodin and alcohol. Her three daughters – Rumer Willis, 21, Scout Willis, 28 and Tallulah Willis, 25 – stopped speaking to her.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

Their father, Moore’s former husband Bruce Willis, also pulled away.

Moore, who was in pain and isolated from her family, weighed a mere 102 lbs. In 2012, the Hollywood star was rushed to the hospital after smoking synthetic marijuana and inhaling nitrous oxide at a party.

“I guess the fundamental question that came forward for me was, ‘How did I get here?’” Moore previously admitted in “Good Morning America.” “From where I started to what I’ve experienced, where I’ve been, how did I get here?”