algorithmic modeling for Rhino
Hi,guys.Is there any way to filter a special string group from a list of string?
for example,I have already filter the number manually.And now I need to all inputed string though the Match Text componet to be true.Actuatlly I need the string have "???x???".
In this case,I have no idea the contents and string length before "???x???".but I guess its lenght will be less than 10.But when I type "?"x10 &"???x???"as pattern.It just find the {"?"x10 & "???x???"} groups.Also I try "#" as numberial placeholder,it fail.Please help.
Tags:
You could use the [Split String] with a space (" ") to split the strings apart into the prefix and suffix. Then use Split again this time wit "x" to get the numbers.
Patterns use the VB Like operator which supports:
Regular Expressions are much more powerful but you'll have to read up on those yourself if you want to use them.
--
David Rutten
david@mcneel.com
Tirol, Austria
Thanks Daivd.It's easy to split out the number for use.But the question is how I found the string has such number combination.I think the question is filter string datalist which has "???x???".sorry for my bad description.I post a new pic below~
OK,guys,the disturbed string may have any letter included "x",This just a sample,the solution should be use in any case.so,from my problem,the only judgement thing is the data has such format of data (000#&"x"&000#) ~anyway,thanks a lot~
Hi channelfei, if you use Matt's definition, and put
\dx\d
in the RegEx (R) input, I think that's what you're after.
:) Hi David - I thought channelfei's goal was to filter all complete strings that contain numberxnumber , like in the attached definition.
Thanks a lot.It work pretty well.And I was thinking your inputed regex "/d/dx".
Thanks.Pieter Segeren was completely solved my question.I think your solution was limited by its string format before #x#. There some data simply as "300x600"or "abc 300x500".
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by