Jump to content

Recommended Posts

Posted

Yes, sorry, I posted right after your post, I was responding to Sm0ke_N's post about the forum bug, I edited my post to make it a little clearer. :x I'm a little bit tired now doh xD

haha :rolleyes: np I just didn't want to miss it if I should know it (wow that's a odd sentence I just wrote :rambo: )

A decision is a powerful thing
Posted

lol okay, well I hope you get it working as you want it. :rambo:

:rolleyes: thanks! I'm really just trying to learn the RegEx "syntax." I'm going to post some of my findings in here (unless that's a bad). I'm trying to understand what equates to a single word. For instance, the example that Smoke_N posted (which works great!) does up to two words (eg. BILL WILDS). However, if in that "column" there is three names for that person (eg. SUE MIRA HUMSTAD) or three names and a salutation (eg. JOSEPH MICHAEL MOORE, Sr.) both get moved into an additional array row or dropped completely. I am reading the manual and searching frantically over the web, but I'm looking for something that explains the syntax in full (maybe I'm just dumb when it comes to this regex).

Local $pattern = '(?s)(?i)\s+(\w+\s\w*|.*?)(?m:$|\s)'
Local $test = StringRegExp('                                       JOSEPH MICHAEL MOORE,Sr.              6,342.89              223,600.02              0.00',$pattern,3)
_ArrayDisplay($test)

Out puts to:

[0]|JOSEPH MICHAEL

[1]|6,342.89

[2]|223,600.02

[3]|0.00

I've tried manipulating his example, but I don't know what I'm doing and I don't know how to say in between large spaces add to array so the out come will be:

[0]|JOSEPH MICHAEL MOORE, Sr.

[1]|6,342.89

[2]|223,600.02

[3]|0.00

or

[0]|SUE MIRA HUMSTAD

[1]|7,000.31

[2]|2,500.18

[3]|0.00

A decision is a powerful thing

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...