OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Help with Search/Marco paramaters.

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
credere35
General User
General User


Joined: 22 Sep 2006
Posts: 5

PostPosted: Fri Sep 22, 2006 11:58 am    Post subject: Help with Search/Marco paramaters. Reply with quote

I wanted to know if I can run a macro or run a search that allows me to use a wild card.

Example of what I would like to accomplish.

WDC119034A1
POR285545B3
WDC1880B1
POR8545A4

I have 500,000 serials to go through and I need to search to display the serials with only for 3 alphabetical then 4 numerical not the 3 alphabetical then 6 numerical. The 3 alphabetical letters do change so a simple sort will not solve it.

Thanks,
Rick
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 7649
Location: Germany

PostPosted: Fri Sep 22, 2006 12:32 pm    Post subject: Reply with quote

Use a regular expression like
^[:alpha:]{3}[:digit:]{4}$
or
^[:upper:]{3}[:digit:]{4}$
with standard filter or search.

^ =starts with
[:named_class:]
{X} exactly X items of the preceeding
$ =end of string
_________________
XUbuntu 9.04, OOo 3.1.1(Sun), Sun Java 1.5.0_06
Back to top
View user's profile Send private message
credere35
General User
General User


Joined: 22 Sep 2006
Posts: 5

PostPosted: Fri Sep 22, 2006 12:39 pm    Post subject: Reply with quote

I get the error "Search Key Not Found"
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 7649
Location: Germany

PostPosted: Fri Sep 22, 2006 1:04 pm    Post subject: Reply with quote

Did you check option "Regular Expression"?
_________________
XUbuntu 9.04, OOo 3.1.1(Sun), Sun Java 1.5.0_06
Back to top
View user's profile Send private message
credere35
General User
General User


Joined: 22 Sep 2006
Posts: 5

PostPosted: Fri Sep 22, 2006 1:25 pm    Post subject: Reply with quote

That did the trick, thank you.

One more question, what type of expression would I use to find the follow serials.


SEA_TRAIN04

I get the alpha and digit but what do I use for "_" underscore?
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 7649
Location: Germany

PostPosted: Fri Sep 22, 2006 1:51 pm    Post subject: Reply with quote

credere35 wrote:
That did the trick, thank you.

One more question, what type of expression would I use to find the follow serials.


SEA_TRAIN04

I get the alpha and digit but what do I use for "_" underscore?


The underscore has no special meaning in regular expressions. Simply use it as "_".
This finds a string, starting with 2-3 upper case letters, followed by underscore and T, followed by at least 4 letters, ending with a two digit number with leading zero (00 to 09).
^[:upper:]{2,3}_T[:alpha:]{4,}0[:digit:]$
There is at least one serious known bug: Named classes at the end of a regex do not work.
^[:upper:]{2,3}_T[:alpha:]{4,}0[:digit:] (<--missing $)
should match the same content, even if there is something behind the last digit, but the named class [:digit:] at the end is ignored.
^[:upper:]{2,3}_T[:alpha:]{4,}0[0-9] is equivalent in this case.
[A-Z] is equivalent to [:upper:] as far as english letters are concerned. ÄÖÜ do not match.
[a-z] is equivalent to [:lower:] as far as english letters are concerned. äöü do not match.
[A-Za-z] is equivalent to [:alpha:] as far as english letters are concerned. ÄÖÜäöü do not match.
All kinds of brackets and ?+*.^$\ have special meanings and must be escaped by backslash. "\*" finds a literal * "\\" finds a literal backslash.
More lenghty stuff on this:
http://www.oooforum.org/forum/viewtopic.phtml?t=43032&highlight=regex&sid=d17a2f4d4d928a4f60eae6e18007f236
_________________
XUbuntu 9.04, OOo 3.1.1(Sun), Sun Java 1.5.0_06
Back to top
View user's profile Send private message
credere35
General User
General User


Joined: 22 Sep 2006
Posts: 5

PostPosted: Fri Sep 22, 2006 2:58 pm    Post subject: Reply with quote

once again thank you, the information was very helpful.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group