S
S
ssneg2011-03-17 18:47:40
HTML
ssneg, 2011-03-17 18:47:40

How to find all numbers greater than 900 inside 500 html files?

Hey!
I have 500 html files, inside a bunch of JS that creates different objects (text boxes, buttons, etc.)
I need to find all objects located further than 900 points. In fact, you need to find all lines of the form "comma, number greater than 900, comma". Then I will manually transfer or delete them.
I suspect Notepad++ could handle it, but I don't understand regexp at all.
I would be grateful for any reasonable ways to make my life easier.
Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
pxx, 2011-03-17
@ssneg

The implementation of regexp in notepad++ is poor, so the search will not work in 1, but if the range of 900+ is reasonable, and not to infinity, then you can make 2-3 queries:
3-digit numbers: ,\s*9\d\d\s *,
4-digit numbers: ,\s*[1-9]\d\d\d\s*,
5-digit numbers: ,\s*[1-9]\d\d\d\d\s *,

Y
YourChief, 2011-03-17
@YourChief

find -iname "*.html" -exec grep -EH "\,9[0-9][0-9]\,|\,[0-9]{4,}\," {} \;
somehow
both of these console utilities can be downloaded for Windows.

L
LordGlue, 2011-03-17
@LordGlue

Advanced Find & Replace under win is also

Z
Zakharov Alexander, 2011-03-18
@AlexZaharow

A well-formulated problem is half the solution. What is "more than 900 points"? If we are talking about controls that are visible in the browser window below (“further”?) 900 points from the top edge of the window? There are a couple of solutions based on automating the processing of the contents of the window by the browser and calculating any visual parameters. Why am I asking this - because if you just need to find numbers in a text file, then I would not talk about five hundred files, and I also did not write about html with javascript. It is misleading.
If we are talking about a simple text search without taking into account, for example, the attributes of html tags, then I advise you to run the proposed regular expressions in Editpad pro. A very powerful text editor and regular expressions, he understands everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question