Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Mysql help [find/replace]

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Mysql help [find/replace]
Reply
 
Thread Tools
Old 24-01-2011, 14:32   #1
Kymmy
Inactive
 
Join Date: Dec 2007
Posts: 18,385
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Mysql help [find/replace]

Is there any way in the regular expresion for doing a "any character" find

In other words if I want to search for any word beginning with A and ending in Z but with any two characters inbetween for example A12Z or AcdZ or A:3Z is there any way of doing it..

Just thought I;d ask as I do have a way of doing it to an SQL dump but wanted to know if I could do it directly via either command line or phpmyadmin
Kymmy is offline   Reply With Quote
Advertisement
Old 24-01-2011, 14:39   #2
Wicked_and_Crazy
Inactive
 
Join Date: Jun 2005
Location: Peterborough
Posts: 5,106
Wicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny star
Wicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny star
Send a message via MSN to Wicked_and_Crazy Send a message via Yahoo to Wicked_and_Crazy
Re: Mysql help [find/replace]

select * from tablename where columnname like 'A%%Z'
Wicked_and_Crazy is offline   Reply With Quote
Old 24-01-2011, 15:02   #3
Kymmy
Inactive
 
Join Date: Dec 2007
Posts: 18,385
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Re: Mysql help [find/replace]

Cool will give it a try

Thank you
Kymmy is offline   Reply With Quote
Old 24-01-2011, 15:06   #4
Paul
Dr Pepper Addict
Cable Forum Admin
 
Paul's Avatar
 
Join Date: Oct 2003
Location: Nottingham
Age: 63
Services: IDNet FTTP (1000M), Sky Q TV, Sky Mobile, Flextel SIP
Posts: 30,319
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Re: Mysql help [find/replace]

You dont need 2 %'s

Also note that that A%Z will match AxxZ or AZ or AxxxxxxxxxZ

If you want it to be just two chars use _ i.e. A__Z
__________________

Baby, I was born this way.
Paul is offline   Reply With Quote
Old 24-01-2011, 15:35   #5
Wicked_and_Crazy
Inactive
 
Join Date: Jun 2005
Location: Peterborough
Posts: 5,106
Wicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny star
Wicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny starWicked_and_Crazy has a nice shiny star
Send a message via MSN to Wicked_and_Crazy Send a message via Yahoo to Wicked_and_Crazy
Re: Mysql help [find/replace]

Quote:
Originally Posted by Paul M View Post
You dont need 2 %'s

Also note that that A%Z will match AxxZ or AZ or AxxxxxxxxxZ

If you want it to be just two chars use _ i.e. A__Z

Whoops, didnt mean to put two % in (although it would still work). Must admit i had assumed that the column was 4 chars in width
Wicked_and_Crazy is offline   Reply With Quote
Old 24-01-2011, 15:43   #6
Kymmy
Inactive
 
Join Date: Dec 2007
Posts: 18,385
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Kymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny starsKymmy has a pair of shiny stars
Re: Mysql help [find/replace]

Paul, thank you very much, exactly what I was after..
Kymmy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:38.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum