Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Regex Question- Word Parsing

jbh1128d1
10 - Fireball

Hello!

 

I'm trying to extract the below bold-underlined pieces from the the phrase using regex.  I tried "\w*\((\w*)\,.*\((.*)\)\).*(/w)" but it doesn't seem to be working. While the bold/underlined may

 

bSpline(((2*Credit-median(Credit))/(max(Credit)-min(Credit))), degree = 1, knots = c(2,375,425))1

 

Anyone have any ideas?

 

6 REPLIES 6
MSalvage
11 - Bolide

@jbh1128d1,

 

This will work.

 

\(\(\(\d.(\<\w+\>).*c\((.*)\)\)(\d*)

 

Best,

MSalvage

vishwa_0308
11 - Bolide

This is my regex : 

Parse:

\w+\W+\d\W+(\w+).*c\((.*\d)\) will give you two required fields only though what @MSalvage provides is also an solution. 

 

Best,

Vishwa

jbh1128d1
10 - Fireball

Thanks @vishwa_0308 but i also have to get the last digit outside the parenthesis as well.  I haven't quite figured out how to modify your code to get that. Thank you for the help though.  You got me closer than I was.

vishwa_0308
11 - Bolide

try this : a little add on for the last digit that i missed earlier:

 

\w+\W+\d\W+(\w+).*c\((.*\d)\).*(\d+)

jbh1128d1
10 - Fireball

Thanks @MSalvage but for some reason, I'm getting NULLs when I run this code.

jbh1128d1
10 - Fireball

Thanks @vishwa_0308.  Worked perfectly.

Labels