Regex :: To Allow Lowercase And Uppercase Letter, And Numbers?

What's a way (like, for a username) to allow lowercase and uppercase letter, and numbers?

Code:

objRegExp.Pattern = "[a-z][0-9]"
objRegExp.Global = True
objRegExp.IgnoreCase = True

That's what I have, but I want to make the letters or numbers OPTIONAL, but right now they are required. how can I fix that?

View Replies


ADVERTISEMENT

First Letter To Uppercase

i need to convert the first letter of a veriable to uppercase (the veriable is loaded and the applied LCase() ).

View Replies View Related

First Letter Is Uppercase

I want to take a value that users type into a field (actually 2 fields--first and last name) and convert the first letter to Upper Case. I thought I could use UCase, but it seems to only work for an entire string.

View Replies View Related

Making Every Word's First Letter On A Field, Uppercase

I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how... any hint?

View Replies View Related

Letter Be Is Inserted Into Numbers

when I ourput data from Access, numbers bigger than 999 are shown with letter "B" inserted into the 4th position left to the coma. (in my w2k regional settings I have the decimal dot separator set to "." and digit group separater set to nothing. In Access the number are shown with "." as decimal separator, but for some reason ASP used "," instead)
Say, 3000,00 is shown as 3B 000,00 Why and how do I sort this out?

View Replies View Related

Lowercase Am / Pm

todaysdatetime = FormatDateTime(Now)to feed the date time into a variable and I get as expected something like this:

2/28/2004 11:51:07 AM

but what I want it the am / pm markers in lower case like

2/28/2004 11:51:07 am

Would this be easy to achive ?

View Replies View Related

Convert First Character To Lowercase

how to convert the first letter in a variable's value to lower-case?

View Replies View Related

Convert Lowercase To Title Case?

Can I change text/data that is entered in a textfield from lowercase to Title Case when it's INSERTed into a database table?

View Replies View Related

Uppercase

How do i change string to uppercase in asp? What does "Ignorecase" does? will it help if i decide to compare 2 strings?

View Replies View Related

Uppercase To Bold

I'm a total asp novice, but could you tell me if the following is possible:

I have a field that contains text with titles in uppercase e.g.

THIS IS TITLE 1
Text goes here

THIS IS TITLE 2
Text goes here

Is there any way to make rows in uppercase display in bold?

View Replies View Related

Uppercase After Space

I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how?

View Replies View Related

Changing Form Input To Uppercase

I have a form, where the user types their initals and it then returns some results. However, the Oracle database requires the initials to be in capitals, how can I convert the user input to upppercase?

View Replies View Related

English Numbers Into Arabic Numbers

I'm working on asp project, access 2000 at backend.I can write arabic text and arabic
numbers in textbox and save them in database.but if i see these records, arabic text and arabic numbers,it is ok,if my computer is arabicenable.

If my computer is not arabic enable then it show arabic number into english numbers.
how can i show arabic numbers instead of english numbers if my computer is not arabic
enable.i'm working on a project i have to complete it.How can i convert english numbers that are coming from database and convert that numbers in arabic for show.

I have use

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
I shall be very thankful to you for this purpose.

View Replies View Related

Regex

I have been trying for days to learn regex, can't seem to get to grips with it at all .

Basically I need to remove all text between strings.

abcdef <mytag>ghijkl</mytag> mnopqr

would be left with

abcdef mnopqr

View Replies View Related

ASP Regex

I am struggling to find a solution to a relatively easy problem I have a string which contains a date in the format of: 20 Sep 2007 14:24

I would like to strip everything off after the month, so I am left with '20 Sep' is there an easy way to do this?

View Replies View Related

RegEx

I have a text search which reads a textfile and displays each line that has a value the user is searching for. It's practically finished except when it searchs it doesn't look for exact matches (e.g a searh for Ali would return Alison or Alice).

How would i go about using RegEx's to prevent this by making the search look for the exact word entered? Code:

View Replies View Related

Regex

I have this pattern to filter out bad words

regx.Pattern = "darn|dick|swear|blahblah"

it works, but in case of the word "dickinson"
the wordfilter also replaces dick in dickinson d***inson,

so i thought i could try this pattern

regx.Pattern = "darn|dick|swear|blahblah"

but no change, i've tested the regex with a similar PHP script and the  operator works.

any clues why it wont work in asp?

View Replies View Related

RegEx

I am trying to do some custom forum code, like using [ b ] as a tag and replacing it later using RegEx. The problem is, its not replacing quite right. Its leaving in the []s and its not closing some of the tags.

Here is my pattern: "[ b ]((.|
)*?)[/ b ]"
Here is my replace text: "<b>$1</b>"

Here is some sample text: "yada yada yada [ b ]hey![/ b ] yada yada"

Now, another thing, I would like it to close tags if they aren't closed properly. Is this possible?

View Replies View Related

Regex

im trying to use Regex to replace some text in my string. I want to replace some text to html tags eg. [b] to <b>, [u] to <u>.

How can I please use like a wildcard for the letter in between the tags. What am i doing wrong in this code, should i replace $1$2 to something else please: Code:

View Replies View Related

VBScript RegEx

I made a regular expression to match Guitar Chords.

[A-G](#|b)?([a-z]|[0-9])*

This pattern should find any of the following:

1) G
2) Gmaj
3) G7
4) G#
5) Gb
6) G#min

The pattern works for all of these except for #4. For some reason it will only return the 'G' instead of the full 'G#'. I find this very odd because if the chord is 'Gb', the regex will return the full 'Gb'.This pattern works fine in javascript. Is there anything special with the '#' character in RegEx for VBScript? I am using VBscript engine 5.6

View Replies View Related

RegEx Problems

I'm using regular expressions to identify in a string an url ad format it in hyperlink.

The problem is that in the same string should be bbcodes and the [url] one tooo... so when the regexp will format the code will format the one in bbcode too.

The solution would be the lookaround function of RegEx to see if behind the match there is the [url] code... but it's not implemented in VisualBasicScript. Is there any way to use this function in my script ?

View Replies View Related

RegEx And .pattern

Is it possible to have more then one pattern for the .pattern variable. If I'm to execute and search and replace on a specific string can I make it so my .pattern will ignore specific keywords and not just A keyword?

View Replies View Related

RegEx.Repalce

i have text, in it i want to highlight the words user used to find this result.
i used the normal replace, it worked fine except the case thing..

SearchForSp = Split(SearchFor, " ")
For i = 0 to Ubound(SearchForSp)
EmpJobsText = Replace(EmpJobsText, SearchForSp(i), "<strong><u><font
color=red>"&SearchForSp(i)&"</font></u></strong>", vbTextCompare)
EmpJobsText
next

i tried to use the regEx.Repalce from the examples in groups but just couldn't find a way. problem is in the normal replace function i have option to supply a source. in this case "EmpJobsText" is the source. but regEx.Repalce don't seem to have place to type where to replace, only what to replace with what.

View Replies View Related

Quick Regex Question

I need a pattern to do this:

"?caid=[0-9]+&pgid=oRS("pgId")"

Where [0-9]+ means you need atleast 1 number there, the rest is just a string plus my recordset's variable. I know this syntax would work with the regex I learned at school but I'm not sure how to make it work in ASP.

View Replies View Related

Checking A String, RegEx

I have a string that I want to check to be sure there are no single or double quotes in it. Using RegEx should be possible but I cannot figure out how the syntax should go.
I am programming in ASP.NET with C# as the code behind.
here is one I know works to be sure there are only numbers in the string, but i can not for the life of me figure out the right syntax for quotes

View Replies View Related

Complex Regex Problem

I am trying to write a regex function that will find all html tags with an id= value and get it to return the tag and value of the id.

i.e. <a href="blah.htm" id="someLink"> would return
a someLink

Any help would be greatly appreciated, this has got me very frustrated.

It will most likley be a very simple thing that I have missed.

View Replies View Related

Regex Replace Question

I have the following regex replace:

putDefInThis = RegExpReplace(putDefInThis, strPattern, "<a href=""" & lcase(replace("$1"," ","-")) & ".asp"">$1</a>")

The problem is that i can not get the vb replace to work on the "$1" in the url. $1 is such that it can be multiple words separated by a space. for the href, I need to convert the space to "-". It does not do that with the way I hvae the code above.

View Replies View Related

Adding An Apostrophe To RegEx Patterns

how to add the symbol ' (Apostrophe) to the code so that the validation accepts this within a surname such as o'neill? this is wot i hav at the minute:

With regExName
.Pattern = "^[a-z]+$"
.IgnoreCase = true
.Global = true
End With

View Replies View Related

Get UNC From Drive Letter

1. The file is on a map drive, which is mapped to a folder
on the same server. Example. The user's folder 'John'.
2. I am able to get the file information
("E:PhotosImage1.jpg") and can copy the file to the
folder. ONCE I KNOW THE UNC ("headoffice-
dellsystPhotosImage1.jpg" file to copy)
I would like to be able to get the UNC from the user's
system, by submitting the drive letter to a function.
This script is for an Intranet and should be in ASP or
JavaScript.
..

View Replies View Related

Letter At Certain Position

After I read in a value from a table i need to read in the last letter of the value and check if it has an "s" as its last letter, so that i can display either ' or 's.

Does anyone know how code to view the last letter of the value or move the variable into javascript so that I can manipulate it from their?

View Replies View Related

Like Statement First Letter

i want to query a fields first letter.how can i do this?Code:

strsql = "SELECT * FROM COORD WHERE First='" & Request.Form("UserName") & "' AND last LIKE '%" & right(last,1) & "%' and active ='" & Request.Form("Password") & "'"

I want the search last by only the first letter of there name.

View Replies View Related

Capitalize Letter

im building an ecommerce site. I asked the client to populate the database i built with all 3000 of their products. They have done this, but put all the data in in CAPITALS. Ive tried 'capitalising' (first letter of each word is a capital) the words in css, but that doesnt work because the letters are all in caps (it would work if they were in lower case).

Has anyone a function written in asp (jscript) to achieve this? Or should I try doing this in sql if this is possible?

View Replies View Related

Capitalize First Letter

We have an ASP VBScript email autoreply. I'd like to make it extra squeaky-clean and have it auto-capitalize the user's first name if they did not. I.e.

"Dear bob, your order has been placed."

to

"Dear Bob, your order has been placed."

I realize that probably the pro way would be to normalize it in the DB when they first sign up.. but this is not necessary, I just need some kinda left-trim-uppercase-codeamabob.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved