For the following Regex
[A-Za-z]*\s([A-Za-z]{1}\.)*([A-Za-z]{1}\.),{1}.*?Arizona State University
I'm getting the following error
The Regular Expression in ParseSimple mode can have 0 or 1 Marked sections, no more.
Can someone explain what this error means? And a way to fix the above regex to avoid this error?
Thank you.
Hey @alteryx_user_9999 -- could you provide a little context? Are you using the RegEx tool, or a RegEx formula in a different tool?
It would be helpful to get an example of the data you are working with and how you would like to see it parsed.
hi @adamweaver39 ,
I've answered my question, but I could use help on the following. I'm trying to parse
Chandwani A.H.M., Power Electronics and Control Engineering (PEACE) Laboratory; Ira A. Fulton School of Engineering, Arizona State University, Tempe.; Dey S., Power Electronics and Control Engineering (PEACE) Laboratory; Ira A. Fulton School of Engineering, Arizona State University, Tempe.; Mallik A., Power Electronics and Control Engineering (PEACE) Laboratory; Ira A. Fulton School of Engineering, Arizona State University, Tempe. (e-mail: ayan.mallik@asu.edu)
to
Chandwani A.H.M., Power Electronics and Control Engineering (PEACE) Laboratory; Ira A. Fulton School of Engineering, Arizona State University
Dey S., Power Electronics and Control Engineering (PEACE) Laboratory; Ira A. Fulton School of Engineering, Arizona State University
Mallik A., Power Electronics and Control Engineering (PEACE) Laboratory; Ira A. Fulton School of Engineering, Arizona State University
I think the following regex would work
[A-Za-z]*\s([A-Za-z]{1}\.)*([A-Za-z]{1}\.),{1}.*?Arizona State University
but the issue is that alteryx uses parentheses to do "marked expressions" causing the search to only match items within the marked expression. Do you know how I can repeat a sub expression in a regex in alteryx? Thank you.
Hi @alteryx_user_9999 , I am not entirely sure I understand the question -- what is the specific change you are trying to create for your output? It looks like you are wanting to remove "Tempe.;" and the email "(e-mail: ayan.mallik@asu.edu)" called out at the end?
Hi @adamweaver39 ,
Thanks for following up. Given a string of text, I want to extract all subtext of the form
Last Name, First initial (maybe middle initial as well)., ... Arizona State University
from that text. I'm using the Tokenize Output Method in the regex tool. I'm hoping to extract all subtext of the form given above into separate rows. The issue I'm having is when there is a first initial, middle initial, etc., when doing the parsing.
In the previous quote, the first block of text is the given string of text; the next is what I am trying to parse to rows.
Let me know if there is anything I can clarify.
Thanks.
Hey @alteryx_user_9999 -- I formulated a 3 step RegEx flow that accomplishes this. Let me know if that helps.
Parse3
Parse2
Parse1
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |