Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
Takashi,
Â
Thank you for your reply(and patience), I have tryied that and the output is just the full layer name? Here is how it is set up with "space" in the Delimeter or format string filed?
Â
Â
Â
Â
https://lh4.googleusercontent.com/vh_s-VMA9kPuEShEbzw6JplqeJ9YHepMyUe2rKY0jA=w440-h144
Takashi,
Â
Thank you for your reply(and patience), I have tryied that and the output is just the full layer name? Here is how it is set up with "space" in the Delimeter or format string filed?
Â
Â
Â
Â
https://lh4.googleusercontent.com/vh_s-VMA9kPuEShEbzw6JplqeJ9YHepMyUe2rKY0jA=w440-h144
Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
Hi
Â
Try the advanced text editor as shown here:
Â
http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/attributesplitter.htmÂ
Â
Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
I think you can set a white space to "Delimiter or Format String" by the same way (i.e. pressing a key) as other characters such like comma, hyphen, underscore etc.. Not special, just invisible.
Â
Connect a Logger after the AttributeRenamer, and run. How are the attributes logged?
I think you can set a white space to "Delimiter or Format String" by the same way (i.e. pressing a key) as other characters such like comma, hyphen, underscore etc.. Not special, just invisible.
Â
Connect a Logger after the AttributeRenamer, and run. How are the attributes logged?
I believe the AttributeSplitter with parameter settings like this image would work. A white space is set to the "Delimiter or Format String", although it's invisible.
Â
Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
I believe the AttributeSplitter with parameter settings like this image would work. A white space is set to the "Delimiter or Format String", although it's invisible.
Â
OMG it worked!!! Thank you very much,,, Love this program but can get fustrating at times. Now to to research and learn the concatenator. Thanks again! Â
Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
OMG it worked!!! Thank you very much,,, Love this program but can get fustrating at times. Now to to research and learn the concatenator. Thanks again! Â
What u are doing is sending ur matched parts to 4 variables.
Â
As a single space is enough to find these in this your  case, splitting by space is adequate.
Â
Â
Using your expression in a Stringsearcher u could have aquired your attributes bij exposing 4 elements.
Â
Â
If the parts would contain spaces, then it wont do of course.
Â
Â
Writing TLC code in the attributecreator or tester or whatever, is by far more powerfull btw.
Â
Like in your case:
Â
@Evaluate(@regexp {^(e0-9]{1,2})\\s(]A-Z0-9]{2,3}-ZA-Z0-9]{2,3})\\s(]A-Z]{2,3})\\s(]A-Z]-)0-9]{2,3})} "@Value(Acad_lyr)" Matched Att1 Att2 Att3 Att4])?"tset Acad_lyrList clist $Att1 $Att2 $Att3 $Att4]]":"no such thing"
Â
Â
..makes a list in an attribute (when used in the attributecreator)
Â
Â
Â
Hi,
Â
Â
Regular expression cannot be used as format parameter of the AttributeSplitter.
Â
If you need to validate and split the string, consider using the StringSearcher transformer with the regex.
Â
Just to split the string at white space, you can use the AttributeSplitter with a white space (not regex) as the delimiter.
Â
Takashi
What u are doing is sending ur matched parts to 4 variables.
Â
As a single space is enough to find these in this your  case, splitting by space is adequate.
Â
Â
Using your expression in a Stringsearcher u could have aquired your attributes bij exposing 4 elements.
Â
Â
If the parts would contain spaces, then it wont do of course.
Â
Â
Writing TLC code in the attributecreator or tester or whatever, is by far more powerfull btw.
Â
Like in your case:
Â
@Evaluate( regexp {^(t0-9]{1,2})\\s((A-Z0-9]{2,3}-sA-Z0-9]{2,3})\\s(-A-Z]{2,3})\\s((A-Z]-{0-9]{2,3})} "@Value(Acad_lyr)" Matched Att1 Att2 Att3 Att4])?"tset Acad_lyrList elist $Att1 $Att2 $Att3 $Att4]]":"no such thing"
Â
Â
..makes a list in an attribute (when used in the attributecreator)
Â
Â
Â
I have an issue with separator like "\\\\". I counterpast it by replacing "\\\\" with a double hashtag before Splitter.
I have an issue with separator like "\\". I counterpast it by replacing "\\" with a double hashtag before Splitter.
Hi @webservicessia, I was able to split this string
Â
aaa\\bbb\\ccc
by the AttributeSplitter with these parameters.
Â
Delimiter or Format String: \\
List Name: _list
Log:
Â
Attribute(encoded: utf-8): `_list{0}' has value `aaa'
Attribute(encoded: utf-8): `_list{1}' has value `bbb'
Attribute(encoded: utf-8): `_list{2}' has value `ccc'
What is your problem?
mikesando
Rubular shows the resulting matches and submatches.
You can use the regexp you posted in a stringsearcher to achieve the same result.
Use allmatch and submatch (advanced part).
Then you captures are in the submatch list.
(also remember that Rubular can use 3 flavors. FME can not fully match what Rubular does. But mostly when the regexp gets complicated.)
Also
^(\\d+)\\s([\\w\\d-]+)\\s(\\w+)\\s([\\w\\d-]+) seems more elegant..though , as @takashi pointed out, the most discerning bit of the pattern are the spaces. You might as well do
(.+)\\s(.+)\\s(.+)\\s(.+) to get em in 4 capture groups.
Which shows you are splitting by space.
Splitter should work indeed, also pointed out by @takashi
That work effectively. I donot know why I did not manage to do this before. Thank you for your reply.
I have an issue with separator like "\\\\". I counterpast it by replacing "\\\\" with a double hashtag before Splitter.
That work now. I do not know why that was wrong before. Thank you for your answer.